From b0d8a55dd9efda90cd6aef1bb6d58106bef378b7 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Mon, 13 Feb 2023 18:50:47 +0100 Subject: [PATCH] fix(aws): Only set bucket var when creds are available (#136) The `dockerBuildWrapper` script enables caching based on the `AWS_BUCKET` environment variable. When calling the `libp2p ping interop test` with a bucket name but no AWS credentials, this leads to the script enabling caching even though the workflow does not have access to AWS. With this commit the environment variable `AWS_BUCKET` is only set when credentials are available and thus the `dockerBuildWrapper` script does not enable caching then workflow does nothave access to AWS. --- .github/actions/run-interop-ping-test/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/run-interop-ping-test/action.yml b/.github/actions/run-interop-ping-test/action.yml index 633270d..ed99658 100644 --- a/.github/actions/run-interop-ping-test/action.yml +++ b/.github/actions/run-interop-ping-test/action.yml @@ -28,7 +28,8 @@ inputs: runs: using: "composite" steps: - - run: | + - if: inputs.s3-access-key-id != '' && inputs.s3-secret-access-key != '' + run: | echo "AWS_BUCKET=${{ inputs.s3-cache-bucket }}" >> $GITHUB_ENV echo "AWS_REGION=${{ inputs.aws-region }}" >> $GITHUB_ENV shell: bash