Skip to content

Commit

Permalink
Merge pull request #62 from telekom-mms/rndmh3ro-patch-1
Browse files Browse the repository at this point in the history
add gh app branch protection token
  • Loading branch information
rndmh3ro authored Aug 22, 2024
2 parents 74d06c2 + e2b702c commit 7633a85
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,22 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
future_release: ${{ steps.version.outputs.next-version }}


# the token is needed so the github app can push to the repository
# the github app can bypass the branch protection rule (need a PR to merge)
# this way it can directly commit to main
- name: Obtain a GitHub App Installation Access Token
id: githubAppAuth
run: |
TOKEN="$(npx obtain-github-app-installation-access-token ci ${{ secrets.GH_BRANCH_PROTECTION_APP_TOKEN }})"
echo "::add-mask::$TOKEN"
echo token=${TOKEN} >> $GITHUB_OUTPUT
- name: push new version
uses: github-actions-x/commit@722d56b8968bf00ced78407bbe2ead81062d8baa # v2.9
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# use the token obtained in the step before
github-token: ${{ steps.githubAppAuth.outputs.token }}
push-branch: 'main'
commit-message: 'update changelog'
force-add: 'true'
Expand Down

0 comments on commit 7633a85

Please sign in to comment.