diff --git a/.github/workflows/terraform_apply.yaml b/.github/workflows/terraform_apply.yaml index 12c67b3..225a822 100644 --- a/.github/workflows/terraform_apply.yaml +++ b/.github/workflows/terraform_apply.yaml @@ -11,6 +11,7 @@ on: concurrency: group: ${{ github.repo }}-${{ vars.terraform_workspace }} + cancel-in-progress: false permissions: write-all # A workflow run is made up of one or more jobs that can run sequentially or in parallel @@ -97,7 +98,13 @@ jobs: HTTP_PROXY: http://proxy.tco.census.gov:3128 HTTPS_PROXY: http://proxy.tco.census.gov:3128 NO_PROXY: ".census.gov,169.254.169.254,148.129.*,10.*,172.18.*,172.22.*,172.23.*,172.24.*,172.25.*,.eks.amazonaws.com,.s3.amazonaws.com,.amazonaws.com" - + + - name: s3-cleanup + uses: CSVD/s3-cleanup@main + if: ${{ failure() }} + with: + cache_key: ${{ steps.terraform_init.outputs.s3_upload_path }} + bucket: image-pipeline-assets Apply: # The type of runner that the job will run on runs-on: ["229685449397"] @@ -139,4 +146,9 @@ jobs: HTTPS_PROXY: http://proxy.tco.census.gov:3128 NO_PROXY: ".census.gov,169.254.169.254,148.129.*,10.*,172.18.*,172.22.*,172.23.*,172.24.*,172.25.*,.eks.amazonaws.com,.s3.amazonaws.com,.amazonaws.com" - + - name: s3-cleanup + uses: CSVD/s3-cleanup@main + if: ${{ always() }} + with: + cache_key: ${{ steps.terraform_init.outputs.s3_upload_path }} + bucket: image-pipeline-assets diff --git a/.github/workflows/terraform_plan.yaml b/.github/workflows/terraform_plan.yaml index 2167303..201d091 100644 --- a/.github/workflows/terraform_plan.yaml +++ b/.github/workflows/terraform_plan.yaml @@ -9,6 +9,7 @@ on: concurrency: group: ${{ github.repo }}-${{ vars.terraform_workspace }} + cancel-in-progress: false permissions: write-all # A workflow run is made up of one or more jobs that can run sequentially or in parallel @@ -87,6 +88,7 @@ jobs: - name: s3-cleanup uses: CSVD/s3-cleanup@main + if: ${{ always() }} with: cache_key: ${{ steps.terraform_init.outputs.s3_upload_path }} bucket: image-pipeline-assets