pipeline #2073
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: pipeline | |
"on": | |
workflow_dispatch: | |
schedule: | |
- cron: "15,45 6-8 * * 1-5" | |
- cron: "35 8,9 * * 4" | |
jobs: | |
run-pipeline: | |
name: Run data pipeline | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# - name: Cache raw data | |
# id: cache-raw | |
# uses: actions/cache@v4 | |
# with: | |
# path: data/raw | |
# key: raw-data | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
cache: pipenv | |
- name: Install dependencies | |
run: | | |
pip install pipenv | |
pipenv sync | |
- name: Run DVC pipelines | |
env: | |
GITHUB_TOKEN: ${{ secrets.TRIGGER_TOKEN }} | |
run: | | |
pipenv run dvc update -R data/raw | |
pipenv run dvc repro -R pipelines | |
- name: Check for updates | |
id: updated | |
run: echo "changes=$(git status --short data/processed data/metadata | wc -l)" >> $GITHUB_OUTPUT | |
- name: Commit and push changes | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: Data updates | |
file_pattern: data output pipelines | |
- name: Trigger downstream pipeline | |
if: steps.updated.outputs.changes > 0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.TRIGGER_TOKEN }} | |
run: | | |
pipenv run python pipelines/trigger.py |