Skip to content

Commit

Permalink
Merge pull request #93 from vania-pooh/master
Browse files Browse the repository at this point in the history
Passing environment variables to aws cli as environment variables
  • Loading branch information
vania-pooh authored Jan 19, 2022
2 parents 8f39bc6 + e9c3ae7 commit 1c3fc54
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,10 @@ jobs:
export VERSION=$(git describe --tags $(git rev-list --tags --max-count=1))-$(git rev-parse --short HEAD)
ci/build.sh $VERSION unstable
- name: Configure S3 credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.S3_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.S3_SECRET_KEY }}
aws-region: ${{ secrets.S3_REGION }}

- name: Send output to S3 bucket
working-directory: ./output
run: aws s3 cp . --endpoint=${{ secrets.S3_ENDPOINT }} s3://${{ secrets.S3_BUCKET_NAME }} --recursive --acl public-read
run: aws s3 cp . --endpoint=${{ secrets.S3_ENDPOINT }} s3://${{ secrets.S3_BUCKET_NAME }} --recursive --acl public-read
env:
AWS_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.S3_REGION }}
13 changes: 5 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,10 @@ jobs:
- name: Build
run: ci/build.sh $RELEASE_VERSION

- name: Configure S3 credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.S3_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.S3_SECRET_KEY }}
aws-region: ${{ secrets.S3_REGION }}

- name: Send output to S3 bucket
working-directory: ./output
run: aws s3 cp . --endpoint=${{ secrets.S3_ENDPOINT }} s3://${{ secrets.S3_BUCKET_NAME }} --recursive --acl public-read
run: aws s3 cp . --endpoint=${{ secrets.S3_ENDPOINT }} s3://${{ secrets.S3_BUCKET_NAME }} --recursive --acl public-read
env:
AWS_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.S3_REGION }}

0 comments on commit 1c3fc54

Please sign in to comment.