Skip to content

Commit

Permalink
Merge pull request #76 from brtrvn/master
Browse files Browse the repository at this point in the history
GitHub Action to copy assets to default workshop bucket on commits
  • Loading branch information
brtrvn authored Aug 8, 2023
2 parents 3ab654d + 6aac950 commit 29f0ca4
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/copy-to-s3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Copy to S3
on:
push:
branches:
- master
env:
AWS_DEFAULT_REGION: us-west-2
AWS_DEFAULT_OUTPUT: json
jobs:
copy-to-s3:
runs-on: ubuntu-latest
# These permissions are needed to interact with GitHub’s OIDC Token endpoint.
permissions:
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-region: us-west-2
## the following creates an ARN based on the values entered into github secrets
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/${{ secrets.AWS_GITHUB_ACTIONS_ROLE }}
- name: Copy files to S3
run: |
aws s3 sync . s3://aws-bootcamp-us-east-1 --exclude "*" --include "resources/*" --include "source/*" --acl authenticated-read --delete
...

0 comments on commit 29f0ca4

Please sign in to comment.