-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GitHub Action to copy assets to default workshop bucket on commits
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
... |