-
Notifications
You must be signed in to change notification settings - Fork 459
53 lines (41 loc) · 1.31 KB
/
upload-to-s3.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: upload-to-s3
on:
push:
branches:
- main
schedule:
# Schedule to run at midnight UTC
- cron: '0 0 * * *'
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup repo
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.13.0
- name: Install dependencies
run: npm ci
- name: Prepare build folder
run: INDEXER_TOKEN=${{ secrets.INDEXER_TOKEN }} npm run build
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install Python dependencies
run: pip install requests
- name: Fetch verified asset icons (verified by Pera)
run: python fetch_verified_asa_icons.py
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::023337100590:role/tinyman-asa-list--github-oidc
role-session-name: tinyman-asa-list--github-oidc
aws-region: eu-central-1
- name: Upload to S3 bucket
run: aws s3 sync ./build/ s3://asa-icons --acl=public-read