Add files via upload #245
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
name: Sync to Amazon ECS | |
env: | |
aws_region: eu-west-2 | |
s3_bucket: exercism-v3-icons | |
on: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: 50 4 * * * | |
workflow_dispatch: | |
jobs: | |
deploy: | |
name: Upload images to S3 | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@e1e17a757e536f70e52b5a12b2e8d1d1c60e04ef | |
with: | |
aws-access-key-id: ${{ secrets.AWS_DEPLOY_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_DEPLOY_SECRET_ACCESS_KEY }} | |
aws-region: ${{ env.aws_region }} | |
- name: Login to Amazon ECR | |
uses: aws-actions/amazon-ecr-login@2f9f10ea3fa2eed41ac443fee8bfbd059af2d0a4 | |
- name: Upload assets to s3 | |
run: | | |
aws s3 sync images s3://${{ env.s3_bucket }}/images/ --acl public-read --no-progress --cache-control max-age=31536000 |