Skip to content

Commit 7c08430

Browse files
41898282+github-actions[bot]@users.noreply.github.comafrittoli
authored andcommitted
Use the cdevents-bot token when pushing
Signed-off-by: 41898282+github-actions[bot]@users.noreply.github.com <GitHub Action>
1 parent cf1eec0 commit 7c08430

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ env:
1313
JAVA_DISTRO: 'zulu'
1414
USER_EMAIL: '[email protected]'
1515
USER_NAME: 'CDEvents Bot'
16+
USER_ID: 'cdevents-bot'
1617

1718
jobs:
1819
release:
@@ -52,7 +53,8 @@ jobs:
5253
git config --global user.email "${{ env.USER_EMAIL }}"
5354
git config --global user.name "${{ env.USER_NAME }}"
5455
git commit -a -m "Releasing version $VERSION"
55-
git push origin main
56+
git remote set-url origin https://${{ env.USER_ID }}:${{ secrets.GH_BOT_TOKEN }}@github.com/${{ github.repository }}.git
57+
git push
5658
5759
- name: Release
5860
env:
@@ -63,5 +65,5 @@ jobs:
6365
GPG_TTY=$(tty)
6466
export GPG_TTY
6567
./mvnw --no-transfer-progress -B --file pom.xml \
66-
-Drepository.url=https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git \
68+
-Drepository.url=https://${{ env.USER_ID }}:${{ secrets.GH_BOT_TOKEN }}@github.com/${{ github.repository }}.git \
6769
-Dmaven.site.skip=true -Drelease=true deploy

0 commit comments

Comments
 (0)