-
Notifications
You must be signed in to change notification settings - Fork 6
71 lines (60 loc) · 1.61 KB
/
Copy pathsync-fastdl.yaml
File metadata and controls
71 lines (60 loc) · 1.61 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---
name: Sync Maps to FastDL S3
on:
push:
branches:
- main
paths:
- "maps.json"
- ".github/workflows/sync-fastdl.yaml"
- "maps/**"
workflow_dispatch:
jobs:
sync-maps:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
- name: Install CMake
run: sudo apt-get update -y && sudo apt-get install -y cmake
- name: Cache maps directory
id: cache-maps
uses: actions/cache@v4
with:
path: maps/
key: maps-${{ hashFiles('maps.json') }}
restore-keys: |
maps-
- name: Cache fastdl directory
id: cache-fastdl
uses: actions/cache@v4
with:
path: fastdl/
key: fastdl-${{ hashFiles('maps.json') }}
restore-keys: |
fastdl-
- name: Use Node.js from .nvmrc
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Download maps
if: steps.cache-maps.outputs.cache-hit != 'true'
run: npm run download:maps
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v5
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: us-east-1
- name: Sync maps to S3
run: npm run sync:fastdl
env:
FASTDL_BUCKET_NAME: ${{ secrets.FASTDL_BUCKET_NAME }}
AWS_REGION: us-east-1