Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AWS Role ARN to access S3 #2473

Merged
merged 1 commit into from
Jun 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 22 additions & 8 deletions .github/workflows/release-build-sign-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -854,17 +854,31 @@ jobs:
signed/win32/*zip \
signed/winx64/*zip

- name: Upload installers to CLAW S3 bucket
# forked for security considerations
uses: pivotalsoftware/s3-sync-action@v0.5.2 #pinned to no-default-region change
- name: Setup aws to upload installers to CLAW S3 bucket
if: ${{ github.ref_type == 'tag' }}
uses: aws-actions/configure-aws-credentials@v2
env:
DEST_DIR: "releases/v${{ env.VERSION_BUILD }}"
SOURCE_DIR: upload
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_S3_ROLE_ARN: ${{ secrets.AWS_S3_ROLE_ARN }}
SOURCE_DIR: upload
DEST_DIR: "releases/v${{ env.INSTALLER_RELEASE_VERSION }}"
with:
aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-1
role-to-assume: ${{ env.AWS_S3_ROLE_ARN }}
role-skip-session-tagging: true
role-duration-seconds: 1200

- name: Upload installers to CLAW S3 bucket
run: |
aws s3 sync upload "s3://${{ env.AWS_S3_BUCKET }}/releases/v${{ env.INSTALLER_RELEASE_VERSION }}/"

- name: list S3 for human verification
uses: docker://amazon/aws-cli:latest
with:
args: s3 ls "${{ env.AWS_S3_BUCKET }}/releases/v${{ env.VERSION_BUILD }}/"
run: |
aws s3 ls "s3://${{ env.AWS_S3_BUCKET }}/releases/v${{ env.INSTALLER_RELEASE_VERSION }}/"

- name: Instruct human to update CLAW
run: |
Expand Down