generated from dbt-labs/dbt-cloud-snowflake-demo-template
-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (27 loc) · 928 Bytes
/
trigger_ci_job.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# name: Trigger dbt Cloud CI
# on:
# pull_request:
# branches:
# - main
# jobs:
# autoscaling:
# runs-on: ubuntu-latest
# env:
# DBT_CLOUD_SERVICE_TOKEN: ${{ secrets.DBT_CLOUD_SERVICE_TOKEN }}
# DBT_CLOUD_ACCOUNT_ID: 64729
# JOB_ID: 442878
# PULL_REQUEST_ID: ${{ github.event.number }}
# GIT_SHA: ${{ github.event.pull_request.head.sha }}
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-python@v2
# with:
# python-version: "3.9.x"
# - name: Trigger CI Job
# run: |
# pip install dbtc==0.3.3
# SO="dbt_cloud_pr_"$JOB_ID"_"$PULL_REQUEST_ID
# run=$(dbtc trigger-job \
# --job-id=$JOB_ID \
# --payload='{"cause": "Smart CI!","git_sha":"'"$GIT_SHA"'","schema_override":"'"$SO"'","github_pull_request_id":'"$PULL_REQUEST_ID"'}' \
# --no-should-poll)