diff --git a/.github/workflows/bump.yml b/.github/workflows/bump.yml index a608a59..11041d3 100644 --- a/.github/workflows/bump.yml +++ b/.github/workflows/bump.yml @@ -1,8 +1,8 @@ name: Bump recipes # Opens one pull request per recipe whose upstream has a newer stable release (scripts/bump.py). -# Pull requests opened with the default GITHUB_TOKEN don't start other workflows, so set the -# BUMP_TOKEN secret (a GitHub App installation token or a fine-grained token with contents and -# pull-requests write) for CI to run on them. +# Pull requests opened with the default GITHUB_TOKEN don't start other workflows, so the run +# signs in as the "Cottage catalog bot" GitHub App (installed on this repository only, contents +# and pull-requests write): the BUMP_APP_ID variable and the BUMP_APP_KEY secret (its private key). on: schedule: [{ cron: "17 6 * * *" }] workflow_dispatch: @@ -11,12 +11,17 @@ jobs: bump: runs-on: ubuntu-latest steps: + - uses: actions/create-github-app-token@v2 + id: app + with: + app-id: ${{ vars.BUMP_APP_ID }} + private-key: ${{ secrets.BUMP_APP_KEY }} - uses: actions/checkout@v4 - with: { fetch-depth: 0, token: "${{ secrets.BUMP_TOKEN || secrets.GITHUB_TOKEN }}" } + with: { fetch-depth: 0, token: "${{ steps.app.outputs.token }}" } - run: pip install --quiet pyyaml - name: Open bump pull requests - env: { GH_TOKEN: "${{ secrets.BUMP_TOKEN || secrets.GITHUB_TOKEN }}" } + env: { GH_TOKEN: "${{ steps.app.outputs.token }}" } run: | - git config user.name "Cottage catalog bot" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git config user.name "cottage-catalog-bot[bot]" + git config user.email "5885297+cottage-catalog-bot[bot]@users.noreply.github.com" python3 scripts/bump.py run