diff --git a/.github/workflows/changelog-autoupdate.yml b/.github/workflows/changelog-autoupdate.yml index 2e71497..bacc61b 100644 --- a/.github/workflows/changelog-autoupdate.yml +++ b/.github/workflows/changelog-autoupdate.yml @@ -6,20 +6,21 @@ on: workflow_dispatch: permissions: - contents: write - pull-requests: write - id-token: write + contents: read env: BRANCH_NAME: chore/changelog-autoupdate jobs: - changelog-autoupdate: + # Builds the changelog under a read-only token, so the tools it installs never + # run beside the write token that opening the pull request needs. + generate: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 with: fetch-depth: 0 # Full history needed for git cliff + persist-credentials: false # Temporary; see the note in release-pr.yml and tracking issue #87. Pinned # only because 2.14.x drops commits that touch .git-blame-ignore-revs # alone (orhun/git-cliff#1643). Drop the pin once that ships rather @@ -36,8 +37,24 @@ jobs: config: .markdownlint.yml globs: | CHANGELOG.md + - uses: actions/upload-artifact@v7 + with: + name: changelog + path: CHANGELOG.md + + pull-request: + needs: generate + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + steps: + - uses: actions/checkout@v7 + - uses: actions/download-artifact@v8 + with: + name: changelog - name: Push changes and create PR - uses: peter-evans/create-pull-request@v8 + uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 with: branch: '${{ env.BRANCH_NAME }}' sign-commits: true diff --git a/.github/workflows/pre-commit-autoupdate.yml b/.github/workflows/pre-commit-autoupdate.yml index 5d483ae..c5f148d 100644 --- a/.github/workflows/pre-commit-autoupdate.yml +++ b/.github/workflows/pre-commit-autoupdate.yml @@ -91,7 +91,7 @@ jobs: echo "default_branch=$DEFAULT" >> "$GITHUB_OUTPUT" - name: Commit changes if: steps.autoupdate-pre-commit.outputs.has_updates == 'true' - uses: iarekylew00t/verified-bot-commit@v2 + uses: iarekylew00t/verified-bot-commit@1ee4374942e5c5f814e9b3121d766cbe45cea360 # v2.3.6 with: message: 'chore(pre-commit): bump hook versions' files: | diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index 5018ac5..6c85f82 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -296,7 +296,7 @@ jobs: - name: Create release PR id: cpr - uses: peter-evans/create-pull-request@v8 + uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 with: branch: ${{ needs.resolve.outputs.branch }} base: main diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index 1694e4d..276e311 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -70,7 +70,7 @@ jobs: uses: sigstore/cosign-installer@v3 - name: Import release GPG key - uses: crazy-max/ghaction-import-gpg@v7 + uses: crazy-max/ghaction-import-gpg@2dc316deee8e90f13e1a351ab510b4d5bc0c82cd # v7.0.0 with: gpg_private_key: ${{ secrets.RELEASE_GPG_PRIVATE_KEY }} passphrase: ${{ secrets.RELEASE_GPG_PASSPHRASE }} diff --git a/.github/workflows/release-tag.yml b/.github/workflows/release-tag.yml index c9302f8..fa60545 100644 --- a/.github/workflows/release-tag.yml +++ b/.github/workflows/release-tag.yml @@ -51,7 +51,7 @@ jobs: echo "tag=$tag" >> "$GITHUB_OUTPUT" - name: Import release GPG key - uses: crazy-max/ghaction-import-gpg@v7 + uses: crazy-max/ghaction-import-gpg@2dc316deee8e90f13e1a351ab510b4d5bc0c82cd # v7.0.0 with: gpg_private_key: ${{ secrets.RELEASE_GPG_PRIVATE_KEY }} passphrase: ${{ secrets.RELEASE_GPG_PASSPHRASE }}