From 7d4969ef3e314943c99927c205f2e27af0906f70 Mon Sep 17 00:00:00 2001 From: Jan Willhaus Date: Sat, 24 Feb 2024 18:38:59 +0100 Subject: [PATCH] ci: Add pre-commit autoupdate workflow --- .github/workflows/pre-commit-autoupdate.yaml | 45 ++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/pre-commit-autoupdate.yaml diff --git a/.github/workflows/pre-commit-autoupdate.yaml b/.github/workflows/pre-commit-autoupdate.yaml new file mode 100644 index 0000000..b3bc1d5 --- /dev/null +++ b/.github/workflows/pre-commit-autoupdate.yaml @@ -0,0 +1,45 @@ +name: Pre-commit Autoupdate + +on: + schedule: + - cron: "0 0 * * 0" # every sunday at midnight + workflow_dispatch: + push: + branches: + - add-pre-commit-autoupdate + +jobs: + autoupdate: + runs-on: ubuntu-latest + environment: release + steps: + - name: Check out + uses: actions/checkout@v3 + + - name: Import GPG key + uses: crazy-max/ghaction-import-gpg@v6 + id: gpg-import + with: + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.GPG_PASSPHRASE }} + git_user_signingkey: true + git_commit_gpgsign: true + + - name: Install pre-commit + run: pipx install pre-commit + + - name: Run pre-commit autoupdate + run: pre-commit autoupdate + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v5 + with: + add-paths: | + .pre-commit-config.yaml + commit-message: "bump(pre-commit): pre-commit autoupdate" + title: "bump(pre-commit): pre-commit autoupdate" + body: "" + token: ${{ secrets.BOT_PERSONAL_ACCESS_TOKEN }} + push-to-fork: janw-bot/podcast-archiver + committer: ${{ steps.gpg-import.outputs.name }} <${{ steps.gpg-import.outputs.email }}> + branch: bump-formula/${{ inputs.formula-name }}-${{github.ref_name}}