-
-
Notifications
You must be signed in to change notification settings - Fork 7
36 lines (29 loc) · 997 Bytes
/
sync.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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