Skip to content

Commit

Permalink
fix: use token to check out on github actions and then push (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
fuziontech committed Aug 8, 2024
1 parent 3972b32 commit 574e225
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,18 @@ jobs:
bump-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.MAX_APP_ID }}
private_key: ${{ secrets.MAX_PRIVATE_KEY }}

- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ steps.generate_token.outputs.token }}

- name: Determine version bump type
id: bump-type
env:
Expand Down Expand Up @@ -65,7 +66,7 @@ jobs:
git config --local user.name "Max Hedgehog"
git add version.go CHANGELOG.md
git commit -m "Bump version to ${{ steps.bump-version.outputs.new_version }}"
git push https://x-access-token:${{ steps.generate_token.outputs.token }}@github.com/${{ github.repository }}.git HEAD:master
git push
- name: Create tag
run: |
Expand Down

0 comments on commit 574e225

Please sign in to comment.