Skip to content

Commit

Permalink
Use environment-specific variables for TFC workspace (patch)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukiffer committed Jan 2, 2023
1 parent 14f39b6 commit 7089734
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/terragrunt-apply.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
secrets:
GIT_TOKEN_BASIC:
required: true
TFC_ACCESS_TOKEN:
TFC_ACCESS_TOKEN_DEV:
required: true
CI_BOT_SSH_KEY:
required: true
Expand Down Expand Up @@ -54,14 +54,14 @@ jobs:
shell: bash

- name: Set Terraform Cloud credentials
if: steps.verify_files_changed.outputs.files_changed == 'true'
if: (steps.verify_files_changed.outputs.files_changed == 'true') && (startsWith(matrix.stack, 'github'))
run: ./.actions/scripts/terraform/set-tfc-credentials.sh
shell: bash
env:
TFC_ACCESS_TOKEN: ${{ secrets.TFC_ACCESS_TOKEN }}
TFC_ACCESS_TOKEN: ${{ secrets.TFC_ACCESS_TOKEN_DEV }}

- name: Set GitHub credentials
if: startsWith(matrix.stack, 'github')
if: (steps.verify_files_changed.outputs.files_changed == 'true') && (startsWith(matrix.stack, 'github'))
run: export GITHUB_TOKEN="$GIT_TOKEN_BASIC"
env:
GIT_TOKEN_BASIC: ${{ secrets.GIT_TOKEN_BASIC }}
Expand Down

0 comments on commit 7089734

Please sign in to comment.