Skip to content

Commit 7d397bf

Browse files
committed
Refactor Terraform workflow to use environment variable for GCP credentials and remove path restriction on push events
1 parent b4f5dc8 commit 7d397bf

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/infra.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44
push:
55
branches:
66
- main
7-
paths:
8-
- "infra/**"
97

108
concurrency:
119
group: ${{ github.workflow }}-${{ github.ref }}
@@ -19,6 +17,9 @@ jobs:
1917
name: Terraform
2018
runs-on: ubuntu-latest
2119

20+
env:
21+
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
22+
2223
steps:
2324
- name: Checkout code
2425
uses: actions/checkout@v6
@@ -29,7 +30,7 @@ jobs:
2930
uses: google-github-actions/auth@v3
3031
with:
3132
project_id: "httparchive"
32-
credentials_json: "${{ secrets.GCP_SA_KEY }}"
33+
credentials_json: ${{ env.GCP_SA_KEY }}
3334

3435
- name: Set up Terraform
3536
uses: hashicorp/setup-terraform@v3.1.2

0 commit comments

Comments
 (0)