-
-
Notifications
You must be signed in to change notification settings - Fork 64
45 lines (43 loc) · 1.4 KB
/
sync-dataworld.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
name: sync-dataworld
on:
workflow_run:
workflows: ["build"]
types: [completed]
branches: [master]
workflow_dispatch:
jobs:
sync-dataworld:
runs-on: ubuntu-latest
container:
image: dcaribou/transfermarkt-datasets:linux-amd64-master
defaults:
run:
shell: bash -l {0}
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v4
# see https://github.com/dcaribou/transfermarkt-datasets/issues/256
- run: |
git config --global --add safe.directory /__w/transfermarkt-datasets/transfermarkt-datasets
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v40
with:
files: |
data/prep.dvc
- name: pull data
if: ${{ steps.changed-files.outputs.any_changed == 'true' }}
run: |
dvc pull
- name: sync
if: ${{ steps.changed-files.outputs.any_changed == 'true' }}
env:
DW_AUTH_TOKEN: ${{ secrets.DW_AUTH_TOKEN }}
# aws credentials are required for to generate presigned urls
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_EC2_METADATA_DISABLED: true # https://github.com/aws/aws-cli/issues/5262
run: |
make \
sync \
SYNCER=sync-dataworld