From 7f1e13f7b2d13f351fe758b10b18231aa135d064 Mon Sep 17 00:00:00 2001 From: miampf Date: Thu, 8 Feb 2024 14:38:19 +0100 Subject: [PATCH] pass secret by environment variable --- .github/actions/e2e_cleanup_timeframe/action.yml | 3 ++- .github/actions/e2e_cleanup_timeframe/e2e-cleanup.sh | 8 +++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/actions/e2e_cleanup_timeframe/action.yml b/.github/actions/e2e_cleanup_timeframe/action.yml index e3f76cc38..17362f3de 100644 --- a/.github/actions/e2e_cleanup_timeframe/action.yml +++ b/.github/actions/e2e_cleanup_timeframe/action.yml @@ -18,9 +18,10 @@ runs: nixTools: | unzip - name: Run cleanup - run: ./.github/actions/e2e_cleanup_timeframe/e2e-cleanup.sh '${{ inputs.encryptionSecret }}' + run: ./.github/actions/e2e_cleanup_timeframe/e2e-cleanup.sh shell: bash env: GH_TOKEN: ${{ inputs.ghToken }} + ENCRYPTION_SECRET: ${{ inputs.encryptionSecret }} diff --git a/.github/actions/e2e_cleanup_timeframe/e2e-cleanup.sh b/.github/actions/e2e_cleanup_timeframe/e2e-cleanup.sh index 611095d41..cbc36d9e0 100755 --- a/.github/actions/e2e_cleanup_timeframe/e2e-cleanup.sh +++ b/.github/actions/e2e_cleanup_timeframe/e2e-cleanup.sh @@ -28,13 +28,11 @@ function delete_iam_config { } # check if the password for artifact decryption was given -if [[ -z $1 ]]; then - echo "No password for artifact decryption provided!" - echo "Usage: ./e2e-cleanup.sh " - exit 1 +if [[ -z $ENCRYPTION_SECRET ]]; then + echo "ENCRYPTION_SECRET is not set. Please set an environment variable with that secret." fi -artifact_pwd=$1 +artifact_pwd=$ENCRYPTION_SECRET shopt -s nullglob