mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-04-20 23:36:29 -04:00
conditionally delete artifact
This commit is contained in:
parent
f26c6c627a
commit
36d05cd677
18
.github/workflows/e2e-test.yml
vendored
18
.github/workflows/e2e-test.yml
vendored
@ -200,6 +200,7 @@ jobs:
|
||||
checks: write
|
||||
contents: read
|
||||
packages: write
|
||||
actions: write
|
||||
needs: [find-latest-image, generate-input-parameters]
|
||||
if: always() && !cancelled()
|
||||
steps:
|
||||
@ -279,6 +280,23 @@ jobs:
|
||||
azureCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }}
|
||||
gcpServiceAccount: "iam-e2e@constellation-e2e.iam.gserviceaccount.com"
|
||||
|
||||
- name: Check if tfstate should be deleted
|
||||
if: always()
|
||||
shell: bash
|
||||
run: |
|
||||
if [ ! -d constellation-terraform ] && [ ! -d constellation-iam-terraform]; then
|
||||
echo "DELETE_TF_STATE=true" >> "$GITHUB_ENV"
|
||||
else
|
||||
echo "DELETE_TF_STATE=false" >> "$GITHUB_ENV"
|
||||
fi
|
||||
|
||||
- name: Delete tfstate artifact
|
||||
if: env.DELETE_TF_STATE == 'true'
|
||||
uses: ./.github/actions/artifact_delete
|
||||
with:
|
||||
name: terraform-state-${{ steps.e2e_test.outputs.namePrefix }}
|
||||
workflowID: ${{ github.run_id }}
|
||||
|
||||
- name: Prepare terraform state folders
|
||||
if: always()
|
||||
shell: bash
|
||||
|
Loading…
x
Reference in New Issue
Block a user