Skip to content

Commit 80563dc

Browse files
committed
fix: configure git remote with token to allow push in GitHub Actions
1 parent 4bcff63 commit 80563dc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/maven_publish.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,20 @@ jobs:
3030
- name: Run Maven Release
3131
run: mvn clean install && mvn io.github.zorin95670:semantic-version:${{ steps.get_version.outputs.version }}:release
3232

33+
- name: Setup git for pushing
34+
run: |
35+
git config user.name "github-actions[bot]"
36+
git config user.email "github-actions[bot]@users.noreply.github.com"
37+
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/Zorin95670/semantic-version.git
38+
3339
- name: Push commit and tags
3440
run: |
3541
git push origin main
3642
git push origin --tags
3743
env:
3844
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3945

46+
4047
- name: Import GPG Key
4148
run: |
4249
echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --no-tty --import

0 commit comments

Comments
 (0)