diff --git a/.github/workflows/template-sync.yml b/.github/workflows/template-sync.yml new file mode 100644 index 0000000..c5518fd --- /dev/null +++ b/.github/workflows/template-sync.yml @@ -0,0 +1,33 @@ +name: Template Sync + +on: + # cronjob trigger - runs monthly on the 1st at midnight + schedule: + - cron: "0 0 1 * *" + workflow_dispatch: +jobs: + repo-sync: + runs-on: ubuntu-latest + if: github.repository != 'AOSSIE-Org/Template-Repo' + # https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs + permissions: + contents: write + pull-requests: write + + steps: + # Check out the repository + - name: Checkout + uses: actions/checkout@v4 + # https://github.com/actions/checkout#usage + # uncomment if you use submodules within the repository + # with: + # submodules: true + + - name: actions-template-sync + uses: AndreasAugustin/actions-template-sync@v2 + with: + source_repo_path: AOSSIE-Org/Template-Repo + upstream_branch: main # defaults to main + pr_labels: template_sync,auto_pr # defaults to template_sync + source_gh_token: ${{ secrets.GITHUB_TOKEN }} + is_pr_cleanup: true # for not open multiple PRs diff --git a/.templatesyncignore b/.templatesyncignore new file mode 100644 index 0000000..5d0a374 --- /dev/null +++ b/.templatesyncignore @@ -0,0 +1,23 @@ +# read this before editing in this file: https://github.com/AndreasAugustin/actions-template-sync?tab=readme-ov-file#ignore-files +# .templatesyncignore +# Files and folders to exclude from template sync +# Uses glob pattern syntax similar to .gitignore +# Note: This file itself cannot be synced - any template changes will be restored automatically + +# Repository-specific files that should not be synced +README.md +LICENSE + +# GitHub workflows are not synced by default due to GitHub policy +# .github/workflows/ + +# Add more patterns to exclude specific files or directories +# Examples: +# docs/ +# *.log +# config/local.yml + +# Use :! prefix for exceptions (pathspec syntax) +# Example - ignore all files except specific ones: +# :!newfile-1.txt +# *