Skip to content

Commit

Permalink
Use owner's PAT in bump-version CI
Browse files Browse the repository at this point in the history
This is to bypass branch-protection rules on `main`.
  • Loading branch information
MattSturgeon committed Jun 6, 2024
1 parent 9299cde commit 619dd73
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/bump-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ on:
concurrency:
group: builds

# Grant GITHUB_TOKEN write access
# GITHUB_TOKEN only needs read access because we'll use a PAT to push
permissions:
contents: write
contents: read

env:
# sed expression to strip whitespace from property keys
Expand Down Expand Up @@ -63,6 +63,9 @@ jobs:
id: commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
# We need to commit as a user to ensure CI is run on the commit
# We need to push as an admin/owner to bypass branch-protection
token: ${{ secrets.HASHALITE_PAT }}
commit_message: Bump version to ${{ steps.new_props.outputs.mod_version }}

- name: Summarize
Expand Down

0 comments on commit 619dd73

Please sign in to comment.