pass secret by environment variable

This commit is contained in:
miampf 2024-02-08 14:38:19 +01:00
parent 5f8c94437b
commit 7f1e13f7b2
No known key found for this signature in database
GPG Key ID: EF039364B5B6886C
2 changed files with 5 additions and 6 deletions

View File

@ -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 }}

View File

@ -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 <ARTIFACT_DECRYPT_PASSWD>"
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