GitHub Maintenance #13
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: 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@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- uses: browniebroke/[email protected] | |
- 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@v4 | |
- uses: ossf/[email protected] | |
with: | |
results_file: results.sarif | |
results_format: sarif | |
publish_results: true | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: SARIF file | |
path: results.sarif | |
retention-days: 5 | |
- uses: github/codeql-action/upload-sarif@v3 | |
with: | |
sarif_file: results.sarif |