Skip to content

Commit

Permalink
Delete cache in plan job if no changes and add GH_TOKEN environment v…
Browse files Browse the repository at this point in the history
…ariable
  • Loading branch information
brettcurtis committed Sep 21, 2024
1 parent ae340fa commit 0f59585
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/plan-and-apply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ jobs:
- name: Delete cache
if: steps.plan.outputs.exitcode != 2
run: gh cache delete ${{ inputs.terraform_workspace }}-${{ github.run_id }}-${{ github.run_attempt }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

outputs:
plan-exit-code: ${{ steps.plan.outputs.exitcode }}
Expand Down

0 comments on commit 0f59585

Please sign in to comment.