diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8dd9c014..b86ea3f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,9 +1,10 @@ -name: Run dbt Cloud CI job +name: dbt Cloud CI on: pull_request: branches: - main + - staging jobs: run_snowflake: diff --git a/.github/workflows/prod_cd.yml b/.github/workflows/prod_cd.yml new file mode 100644 index 00000000..c85d98f3 --- /dev/null +++ b/.github/workflows/prod_cd.yml @@ -0,0 +1,55 @@ +name: dbt Cloud Deploy + +on: + push: + branches: + - main + +jobs: + run_snowflake: + name: dbt Cloud Deploy Prod Snowflake + runs-on: macos-latest + + env: + DBT_ACCOUNT_ID: 188483 + DBT_PROJECT_ID: 283328 + DBT_PR_JOB_ID: 409009 + DBT_API_KEY: ${{ secrets.DBT_CLOUD_API_KEY }} + DBT_JOB_CAUSE: "GitHub Actions Request" + DBT_JOB_BRANCH: main + + steps: + - uses: "actions/checkout@v4" + - uses: "actions/setup-python@v5" + with: + python-version: "3.12" + - name: Install uv + run: python3 -m pip install uv + - name: Install deps + run: uv pip install -r requirements.txt --system + - name: Run dbt Cloud job + run: python3 .github/workflows/scripts/dbt_cloud_run_job.py + + run_bigquery: + name: dbt Cloud Deploy Prod BigQuery + runs-on: macos-latest + + env: + DBT_ACCOUNT_ID: 188483 + DBT_PROJECT_ID: 275557 + DBT_PR_JOB_ID: 553247 + DBT_API_KEY: ${{ secrets.DBT_CLOUD_API_KEY }} + DBT_JOB_CAUSE: "GitHub Actions Request" + DBT_JOB_BRANCH: main + + steps: + - uses: "actions/checkout@v4" + - uses: "actions/setup-python@v5" + with: + python-version: "3.12" + - name: Install uv + run: python3 -m pip install uv + - name: Install deps + run: uv pip install -r requirements.txt --system + - name: Run dbt Cloud job + run: python3 .github/workflows/scripts/dbt_cloud_run_job.py diff --git a/.github/workflows/staging_cd.yml b/.github/workflows/staging_cd.yml new file mode 100644 index 00000000..e1cf2325 --- /dev/null +++ b/.github/workflows/staging_cd.yml @@ -0,0 +1,55 @@ +name: dbt Cloud Deploy Staging + +on: + push: + branches: + - staging + +jobs: + run_snowflake: + name: dbt Cloud Deploy Staging Snowflake + runs-on: macos-latest + + env: + DBT_ACCOUNT_ID: 188483 + DBT_PROJECT_ID: 283328 + DBT_PR_JOB_ID: 565266 + DBT_API_KEY: ${{ secrets.DBT_CLOUD_API_KEY }} + DBT_JOB_CAUSE: "GitHub Actions Request" + DBT_JOB_BRANCH: main + + steps: + - uses: "actions/checkout@v4" + - uses: "actions/setup-python@v5" + with: + python-version: "3.12" + - name: Install uv + run: python3 -m pip install uv + - name: Install deps + run: uv pip install -r requirements.txt --system + - name: Run dbt Cloud job + run: python3 .github/workflows/scripts/dbt_cloud_run_job.py + + run_bigquery: + name: dbt Cloud Deploy Staging BigQuery + runs-on: macos-latest + + env: + DBT_ACCOUNT_ID: 188483 + DBT_PROJECT_ID: 275557 + DBT_PR_JOB_ID: 560539 + DBT_API_KEY: ${{ secrets.DBT_CLOUD_API_KEY }} + DBT_JOB_CAUSE: "GitHub Actions Request" + DBT_JOB_BRANCH: main + + steps: + - uses: "actions/checkout@v4" + - uses: "actions/setup-python@v5" + with: + python-version: "3.12" + - name: Install uv + run: python3 -m pip install uv + - name: Install deps + run: uv pip install -r requirements.txt --system + - name: Run dbt Cloud job + run: python3 .github/workflows/scripts/dbt_cloud_run_job.py