Skip to content

Commit

Permalink
chore: use App token for checkout too to fix issue with issue we get …
Browse files Browse the repository at this point in the history
…sometimes: 'error: insufficient permission for adding an object to repository database'
  • Loading branch information
hansjoergventx committed Oct 21, 2023
1 parent af0a61b commit 1dd77a1
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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-')
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 1dd77a1

Please sign in to comment.