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.
This commit is contained in:
Max Inden 2023-02-13 18:50:47 +01:00 committed by GitHub
parent 9643a1f4bc
commit b0d8a55dd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -28,7 +28,8 @@ inputs:
runs: runs:
using: "composite" using: "composite"
steps: 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_BUCKET=${{ inputs.s3-cache-bucket }}" >> $GITHUB_ENV
echo "AWS_REGION=${{ inputs.aws-region }}" >> $GITHUB_ENV echo "AWS_REGION=${{ inputs.aws-region }}" >> $GITHUB_ENV
shell: bash shell: bash