Skip to content

Commit 36b261c

Browse files
Fix terraform steps in CI PR #2 (#8147)
Attempt to conditionally run terraform steps only if secrets are available. Add fromJSON to convert env var string value to boolean.
1 parent 0068ed5 commit 36b261c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/test-changed-firestore-integration.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,23 @@ jobs:
3434
# This makes Actions fetch all Git history so run-changed script can diff properly.
3535
fetch-depth: 0
3636
- uses: 'google-github-actions/auth@v0'
37-
if: ${{ env.run_terraform_steps }}
37+
if: ${{ fromJSON(env.run_terraform_steps) }}
3838
with:
3939
credentials_json: '${{ secrets.JSSDK_ACTIONS_SA_KEY }}'
4040

4141
# create composite indexes with Terraform
4242
- name: Setup Terraform
43-
if: ${{ env.run_terraform_steps }}
43+
if: ${{ fromJSON(env.run_terraform_steps) }}
4444
uses: hashicorp/setup-terraform@v2
4545
- name: Terraform Init
46-
if: ${{ env.run_terraform_steps }}
46+
if: ${{ fromJSON(env.run_terraform_steps) }}
4747
run: |
4848
cp config/ci.config.json config/project.json
4949
cd packages/firestore
5050
terraform init
5151
continue-on-error: true
5252
- name: Terraform Apply
53-
if: github.event_name == 'pull_request' && env.run_terraform_steps
53+
if: github.event_name == 'pull_request' && fromJSON(env.run_terraform_steps)
5454
run: |
5555
cd packages/firestore
5656

0 commit comments

Comments
 (0)