From 574e225e9a5466b8e2af2a578b88d24aeba6f601 Mon Sep 17 00:00:00 2001 From: James Greenhill Date: Thu, 8 Aug 2024 16:31:23 -0700 Subject: [PATCH] fix: use token to check out on github actions and then push (#59) --- .github/workflows/bump-version.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 198c9af..7e8f847 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -9,10 +9,6 @@ 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 @@ -20,6 +16,11 @@ jobs: 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: @@ -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: |