Skip to content

sync-dataworld

sync-dataworld #296

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