From 1dd77a18400bbf1fc42c511251faf2f615403dfd Mon Sep 17 00:00:00 2001 From: hansjoergventx Date: Sat, 21 Oct 2023 23:25:15 +0200 Subject: [PATCH] chore: use App token for checkout too to fix issue with issue we get sometimes: 'error: insufficient permission for adding an object to repository database' --- .github/workflows/release-please.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index ad08d5f..8f2e2a3 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -21,10 +21,18 @@ jobs: TF_VAR_workspace_name: rover TFVER: 1.1.2 # Rover uses Terraform 1.1.2, so we need to use the same version for the plan file steps: + - name: Generate token + id: app-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ secrets.APP_ID }} + private-key: ${{ secrets.PRIVATE_KEY }} + - name: Checkout uses: actions/checkout@v4 with: persist-credentials: false # required for ad-m/github-push-action with GH App Token + token: ${{ steps.app-token.outputs.token }} - name: Configure AWS credentials if: startsWith(github.repository, 'ventx/terraform-aws-') @@ -89,13 +97,6 @@ jobs: - name: terraform-docs uses: terraform-docs/gh-actions@v1 - - name: Generate token - id: app-token - uses: actions/create-github-app-token@v1 - with: - app-id: ${{ secrets.APP_ID }} - private-key: ${{ secrets.PRIVATE_KEY }} - - name: Commit files run: | git config --local user.email "github-actions[bot]@users.noreply.github.com"