Skip to content

Commit

Permalink
ci: add token to push step
Browse files Browse the repository at this point in the history
  • Loading branch information
glichtner committed May 30, 2024
1 parent c1dec44 commit ff7b385
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false # Do not store credentials as they will be configured manually

- name: Setup Node.js
uses: actions/setup-node@v4
Expand All @@ -102,11 +103,17 @@ jobs:
- name: Update sushi-config.yaml with new version
run: |
yq eval '.version = "${{ needs.check-release.outputs.new_release_version }}"' -i sushi-config.yaml
- name: Commit and push updated sushi-config.yaml
- name: Configure git and push changes
env:
REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
run: |
git config user.name 'github-actions'
git config user.email '[email protected]'
# Inject the token directly into the remote URL securely
git remote set-url origin https://x-access-token:${REPO_ACCESS_TOKEN}@www.github.com/${{ github.repository }}.git
git add sushi-config.yaml
git commit -m "Update sushi-config.yaml for release ${{ needs.check-release.outputs.new_release_version }}"
git push
Expand Down

0 comments on commit ff7b385

Please sign in to comment.