add workflow

This commit is contained in:
sam 2024-12-04 10:03:11 +08:00
parent 4ead061709
commit ecbda74360
2 changed files with 50 additions and 2 deletions

46
.github/workflows/dbt_seed_refresh.yml vendored Normal file
View File

@ -0,0 +1,46 @@
name: dbt_seed_refresh
run-name: dbt_seed_refresh
on:
push:
branches:
- main
paths:
- "data/**/*.csv" # Only trigger when CSV files change
env:
DBT_PROFILES_DIR: ./
ACCOUNT: "${{ vars.ACCOUNT }}"
ROLE: "${{ vars.ROLE }}"
USER: "${{ vars.USER }}"
PASSWORD: "${{ secrets.PASSWORD }}"
REGION: "${{ vars.REGION }}"
DATABASE: "${{ vars.DATABASE }}"
WAREHOUSE: "${{ vars.WAREHOUSE }}"
SCHEMA: "${{ vars.SCHEMA }}"
concurrency:
group: ${{ github.workflow }}
jobs:
run_dbt_jobs:
runs-on: ubuntu-latest
environment:
name: workflow_prod
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
- name: install dependencies
run: |
pip install -r requirements.txt
dbt deps
- name: Run dbt seed
run: |
dbt seed

View File

@ -5,5 +5,7 @@ dbt_run_scheduled_decoded_logs,"8,38 * * * *"
dbt_test_intraday,"39 */4 * * *"
dbt_test_daily,"22 8 * * *"
dbt_test_monthly,"5 7 28 * *"
dbt_run_scheduled_abis,"11 23 * * *"
dbt_run_streamline_decoded_logs_history,"5 22 * * 6"
dbt_run_scheduled_abis,"11 */12 * * *"
dbt_run_streamline_decoded_logs_history,"5 22 * * 6"
dbt_run_scheduled_decoded_logs_history_user_abis,"38 23 * * *"
dbt_run_full_observability,"0 18 1 * *"
1 workflow_name workflow_schedule
5 dbt_test_intraday 39 */4 * * *
6 dbt_test_daily 22 8 * * *
7 dbt_test_monthly 5 7 28 * *
8 dbt_run_scheduled_abis 11 23 * * * 11 */12 * * *
9 dbt_run_streamline_decoded_logs_history 5 22 * * 6
10 dbt_run_scheduled_decoded_logs_history_user_abis 38 23 * * *
11 dbt_run_full_observability 0 18 1 * *