Skip to content

Commit fe3c7a4

Browse files
committed
fix: Update version bump workflow to use application token
1 parent c6ad10c commit fe3c7a4

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

.github/workflows/bump-version.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ jobs:
1212
name: Bump and Release
1313
permissions:
1414
contents: write
15-
# Prevent circular workflow run. Keyed on the commit message rather than the
16-
# pusher, which is no longer a fixed user name. (Belt and braces: pushes made
17-
# with GITHUB_TOKEN do not trigger workflows.)
15+
# Prevent circular workflow run. Keyed on the commit message, not the pusher:
16+
# the bump is pushed by the emnify-github-actions App (pusher name
17+
# emnify-github-actions[bot], which does not match the old 'emnify-gha'
18+
# check), and App pushes DO re-trigger workflows.
1819
if: "!contains(github.event.head_commit.message, '[Automated] Version Bump')"
1920
runs-on: ubuntu-latest
2021

@@ -24,7 +25,19 @@ jobs:
2425
with:
2526
access_token: ${{ github.token }}
2627

28+
# Installation token for the emnify-github-actions App, which is on the
29+
# bypass list for protected main and so can push the version bump. Replaces
30+
# the expired EMNIFY_GITHUB_ACTIONS_TOKEN PAT.
31+
- name: Retrieve application token
32+
id: get_token
33+
uses: actions/create-github-app-token@v1
34+
with:
35+
app-id: ${{ secrets.EMNIFY_GITHUB_ACTIONS_APP_ID }}
36+
private-key: ${{ secrets.EMNIFY_GITHUB_ACTIONS_APP_PEM }}
37+
2738
- uses: actions/checkout@v4
39+
with:
40+
token: ${{ steps.get_token.outputs.token }}
2841

2942
- name: Bump version and push tag
3043
id: tag_version

0 commit comments

Comments
 (0)