Skip to content

Commit

Permalink
Switch pipeline to use GitHub App
Browse files Browse the repository at this point in the history
  • Loading branch information
BjoernPetersen committed Aug 30, 2024
1 parent 82f7abf commit 6465fe4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
- uses: asdf-vm/actions/install@v3
- run: terraform init -backend=false
- run: terraform validate
env:
GITHUB_APP_PEM_FILE: ${{ secrets.GH_APP_PEM_FILE }}

plan:
runs-on: ubuntu-latest
Expand All @@ -34,7 +36,7 @@ jobs:
env:
DOPPLER_TOKEN: ${{ secrets.TERRAFORM_DOPPLER_TOKEN }}
GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_SA_JSON }}
GITHUB_TOKEN: ${{ secrets.TERRAFORM_GITHUB_TOKEN }}
GITHUB_APP_PEM_FILE: ${{ secrets.GH_APP_PEM_FILE }}
steps:
- uses: actions/checkout@v4
- uses: asdf-vm/actions/install@v3
Expand All @@ -49,7 +51,7 @@ jobs:
env:
DOPPLER_TOKEN: ${{ secrets.TERRAFORM_DOPPLER_TOKEN }}
GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_SA_JSON }}
GITHUB_TOKEN: ${{ secrets.TERRAFORM_GITHUB_TOKEN }}
GITHUB_APP_PEM_FILE: ${{ secrets.GH_APP_PEM_FILE }}
steps:
- uses: actions/checkout@v4
- uses: asdf-vm/actions/install@v3
Expand Down
9 changes: 9 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,19 @@ terraform {
}
}

locals {
gh_app_id = "Iv23lic3F7QIQ3ouYfNO"
}

provider "doppler" {}

provider "github" {
owner = "preparingforexams"
app_auth {
id = local.gh_app_id
pem_file = null
installation_id = "54329043"
}
}

provider "google" {
Expand Down

0 comments on commit 6465fe4

Please sign in to comment.