Skip to content

Commit

Permalink
Update composite actions to use inputs (fix)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukiffer committed Jan 2, 2023
1 parent 9e50f66 commit 541d977
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/composites/setup-github-auth.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Setup GitHub Authentication
secrets:
inputs:
GIT_TOKEN_BASIC:
required: true
runs:
Expand All @@ -9,4 +9,4 @@ runs:
run: export GITHUB_TOKEN="$GIT_TOKEN_BASIC"
shell: bash
env:
GIT_TOKEN_BASIC: ${{ secrets.GIT_TOKEN_BASIC }}
GIT_TOKEN_BASIC: ${{ inputs.GIT_TOKEN_BASIC }}
13 changes: 8 additions & 5 deletions .github/composites/terragrunt-apply.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ inputs:
required: false
type: string
default: .*\.(hcl|json|yaml)$
secrets:
GIT_TOKEN_BASIC:
githubAccessToken:
description: The GitHub PAT used to access GitHub repositories (required to access private repositories, such as stack-modules).
required: true
TFC_ACCESS_TOKEN:
type: string
terraformCloudAccessToken:
description: The access token used to access and interact with remote state/locks stored in Terraform Cloud.
required: true
type: string
runs:
using: composite
steps:
Expand Down Expand Up @@ -44,11 +47,11 @@ runs:
run: ./.actions/scripts/terraform/set-tfc-credentials.sh
shell: bash
env:
TFC_ACCESS_TOKEN: ${{ secrets.TFC_ACCESS_TOKEN }}
TFC_ACCESS_TOKEN: ${{ inputs.terraformCloudAccessToken }}

- name: Terragrunt Apply
if: steps.verify_files_changed.outputs.files_changed == 'true'
run: ./.actions/scripts/terraform/run-terragrunt-apply.sh '${{ inputs.baseDirectory }}'
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN_BASIC }}
GITHUB_TOKEN: ${{ inputs.githubAccessToken }}

0 comments on commit 541d977

Please sign in to comment.