fix update_tfstate

move comparison to correct scope
This commit is contained in:
miampf 2024-04-19 12:15:01 +02:00
parent 774fb3f060
commit dbc648089b
No known key found for this signature in database
GPG Key ID: EF039364B5B6886C
2 changed files with 5 additions and 4 deletions

View File

@ -13,13 +13,14 @@ inputs:
required: true
skipDeletion:
description: "Don't try to delete the artifact before updating. You should only use this if you know that no artifact exists."
default: false
default: "false"
required: false
runs:
using: "composite"
steps:
- name: Check if tfstate should be deleted
if: always() && !${{ inputs.skipDeletion }}
if: always() && ${{ inputs.skipDeletion }} == "false"
shell: bash
run: |
if [ ! -d constellation-terraform ] && [ ! -d constellation-iam-terraform ]; then
@ -29,7 +30,7 @@ runs:
fi
- name: Delete tfstate artifact if necessary
if: always() && env.DELETE_TF_STATE == 'true' && !${{ inputs.skipDeletion }}
if: always() && env.DELETE_TF_STATE == 'true' && ${{ inputs.skipDeletion }} == "false"
uses: ./.github/actions/artifact_delete
with:
name: ${{ inputs.name }}

View File

@ -216,5 +216,5 @@ jobs:
name: terraform-state-${{ github.run_id }}
runID: ${{ github.run_id }}
encryptionSecret: ${{ secrets.ARTIFACT_ENCRYPT_PASSWD }}
skipDeletion: true
skipDeletion: "true"