cicd #549
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: cicd | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0/3 * * *" | |
pull_request: | |
paths: | |
- '.github/workflows/cicd.yaml' | |
- 'requirements.txt' | |
- '**.py' | |
- 'justfile' | |
jobs: | |
ingest-etl-backup-deploy-test: | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: google-github-actions/auth@v1 | |
with: | |
credentials_json: ${{ secrets.GCLOUD_JSON }} | |
- uses: extractions/setup-just@v1 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: install requirements | |
run: just setup | |
- name: load backup data | |
run: just download | |
env: | |
AZURE_STORAGE_KEY: ${{ secrets.AZURE_STORAGE_KEY }} | |
AZURE_STORAGE_CONTAINER: prod | |
- name: ingest | |
run: just ingest | |
env: | |
BQ_PROJECT_ID: voltrondata-demo | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: run ETL job | |
run: just run | |
- name: backup and sync to cloud(s) | |
run: | | |
just backup | |
just sync | |
env: | |
AZURE_STORAGE_KEY: ${{ secrets.AZURE_STORAGE_KEY }} | |
AZURE_STORAGE_CONTAINER: prod | |
- name: deploy to prod | |
run: just deploy | |
env: | |
MOTHERDUCK_TOKEN: ${{ secrets.MOTHERDUCK_TOKEN }} | |
- name: test | |
run: just test | |
env: | |
MOTHERDUCK_TOKEN: ${{ secrets.MOTHERDUCK_TOKEN }} |