Skip to content

Commit

Permalink
chore(CI): fix the workflow that comments the docker image on the com…
Browse files Browse the repository at this point in the history
…mit (#12693) (#12711)

Replace `${{ secrets.GHA_COMMENT_TOKEN }}` with `${{ secrets.GITHUB_TOKEN }}`.

The `${{ secrets.GHA_COMMENT_TOKEN }}` needs to be manually rotated,
replacing it by `${{ secrets.GITHUB_TOKEN }}`, which is generated by each
run of the workflow, so we don't need to rotate token anymore.
  • Loading branch information
ADD-SP authored Mar 12, 2024
1 parent 5308d9e commit 697d27f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ env:

HAS_ACCESS_TO_GITHUB_TOKEN: ${{ github.event_name != 'pull_request' || (github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]') }}


jobs:
metadata:
name: Metadata
Expand Down Expand Up @@ -306,6 +307,10 @@ jobs:
needs: [metadata, build-packages]
runs-on: ubuntu-22.04

permissions:
# create comments on commits for docker images needs the `write` permission
contents: write

strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -393,7 +398,7 @@ jobs:
uses: peter-evans/commit-comment@5a6f8285b8f2e8376e41fe1b563db48e6cf78c09 # v3.0.0
continue-on-error: true # TODO: temporary fix until the token is back
with:
token: ${{ secrets.GHA_COMMENT_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
body: |
### Bazel Build
Docker image available `${{ needs.metadata.outputs.prerelease-docker-repository }}:${{ github.sha }}`
Expand Down

0 comments on commit 697d27f

Please sign in to comment.