|
| 1 | +--- |
| 2 | +name: Template Sync |
| 3 | +on: |
| 4 | + # checkov:skip=CKV_GHA_7: "Workflow dispatch inputs are required for manual debugging and configuration" |
| 5 | + workflow_dispatch: |
| 6 | + inputs: |
| 7 | + dryRun: |
| 8 | + description: Dry Run |
| 9 | + default: "false" |
| 10 | + required: false |
| 11 | + logLevel: |
| 12 | + description: Log Level |
| 13 | + default: "debug" |
| 14 | + required: false |
| 15 | + |
| 16 | + schedule: |
| 17 | + # Run on the 1st of every month at 00:00 UTC |
| 18 | + - cron: "0 0 1 * *" |
| 19 | + |
| 20 | + push: |
| 21 | + branches: ["main"] |
| 22 | + paths: |
| 23 | + - ".github/**" |
| 24 | + - ".hooks/**" |
| 25 | + - ".pre-commit-config.yaml" |
| 26 | + - ".mdlrc" |
| 27 | + - ".editorconfig" |
| 28 | + - "Taskfile.yaml" |
| 29 | + - ".task/**" |
| 30 | + |
| 31 | +permissions: |
| 32 | + contents: write |
| 33 | + pull-requests: write |
| 34 | + |
| 35 | +concurrency: |
| 36 | + group: ${{ github.workflow }}-${{ github.run_number || github.ref }} |
| 37 | + cancel-in-progress: true |
| 38 | + |
| 39 | +jobs: |
| 40 | + template-sync: |
| 41 | + name: Template Sync |
| 42 | + runs-on: ubuntu-latest |
| 43 | + steps: |
| 44 | + - name: Generate Token |
| 45 | + uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6 |
| 46 | + id: app-token |
| 47 | + with: |
| 48 | + app-id: "${{ secrets.BOT_APP_ID }}" |
| 49 | + private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}" |
| 50 | + owner: "${{ github.repository_owner }}" |
| 51 | + |
| 52 | + - name: Checkout |
| 53 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 54 | + with: |
| 55 | + token: "${{ steps.app-token.outputs.token }}" |
| 56 | + |
| 57 | + - name: Template Sync |
| 58 | + uses: AndreasAugustin/actions-template-sync@v2 |
| 59 | + with: |
| 60 | + source_gh_token: ${{ steps.app-token.outputs.token }} |
| 61 | + git_user_name: github-actions[bot] |
| 62 | + git_user_email: github-actions[bot]@users.noreply.github.com |
| 63 | + pr_title: "chore: sync infrastructure files with template" |
| 64 | + pr_labels: sync,template |
| 65 | + pr_body: | |
| 66 | + 🤖 A new version of the python template files is available. |
| 67 | +
|
| 68 | + This PR was automatically created to sync the following: |
| 69 | + - GitHub Actions workflows |
| 70 | + - Pre-commit hooks and configs |
| 71 | + - Task definitions |
| 72 | + - Editor configs and linter rules |
| 73 | +
|
| 74 | + Please review the changes carefully before merging. |
| 75 | + source_repo_path: dreadnode/python-template |
| 76 | + steps: "prechecks,pull,commit,push,pr" |
| 77 | + upstream_branch: main |
0 commit comments