Weekly GitHub Maintenance #17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Weekly GitHub Maintenance | |
| on: | |
| schedule: | |
| # every Monday at 02:00 AM UTC | |
| - cron: "0 2 * * 1" | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }} | |
| cancel-in-progress: true | |
| jobs: | |
| pre-commit-auto-update: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - uses: browniebroke/pre-commit-autoupdate-action@v1.0.1 | |
| - if: always() | |
| uses: actions/create-github-app-token@v2 | |
| id: app-token | |
| with: | |
| app-id: ${{ vars.PR_APP_ID }} | |
| private-key: ${{ secrets.PR_APP_KEY }} | |
| - if: always() | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| token: ${{ steps.app-token.outputs.token }} | |
| commit-message: "Automated `pre-commit` hook update" | |
| branch: pre-commit-hooks-update | |
| title: "[MNT] Automated `pre-commit` hook update" | |
| body: "Automated weekly update to `.pre-commit-config.yaml` hook versions." | |
| labels: maintenance, full pre-commit | |
| github-security-scorecard: | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| security-events: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ossf/scorecard-action@v2.4.3 | |
| with: | |
| results_file: results.sarif | |
| results_format: sarif | |
| publish_results: true | |
| - uses: actions/upload-artifact@v5 | |
| with: | |
| name: SARIF file | |
| path: results.sarif | |
| retention-days: 5 | |
| - uses: github/codeql-action/upload-sarif@v4 | |
| with: | |
| sarif_file: results.sarif |