Skip to content

Commit

Permalink
Update terraform_apply.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
arnol377 committed Oct 16, 2024
1 parent f15ebb9 commit c4b26e9
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/terraform_apply.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ jobs:
# This workflow contains a single job called "build"
Plan:
# The type of runner that the job will run on
outputs:
commit_sha: "${{ steps.git_show.utputs.commit_sha }}"
cache_key: ${{ steps.terraform_init.outputs.s3_upload_path }}

runs-on: ["229685449397"]

env:
Expand All @@ -34,7 +38,10 @@ jobs:
persist-credentials: false

- name: git show
run: echo "commit_sha=$(git show | grep commit | head -1 | awk '{ print $NF }')" >> $GITHUB_ENV
id: git_show
run: |
echo "commit_sha=$(git show | grep commit | head -1 | awk '{ print $NF }')" >> $GITHUB_ENV
echo "commit_sha=$(git show | grep commit | head -1 | awk '{ print $NF }')" >> $GITHUB_OUTPUT
- name: AWS Auth
id: aws_auth
Expand Down Expand Up @@ -115,7 +122,7 @@ jobs:
varfile: varfiles/${{ vars.terraform_workspace }}.tfvars
download_cache: true
setup_terraform: false
cache_key: ${{ steps.terraform_init.outputs.s3_upload_path }}
cache_key: ${{ needs.Plan.outputs.cache_key }}
env:
AWS_ACCESS_KEY_ID: ${{ steps.aws_auth.outputs.aws_access_key_id }}
AWS_SECRET_ACCESS_KEY: ${{ steps.aws_auth.outputs.aws_secret_access_key }}
Expand Down

0 comments on commit c4b26e9

Please sign in to comment.