Merge pull request #1 from ramiz-bozai-dbt/metricflow_test #2
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
# This action will trigger an already created job on dbt Cloud | |
# The important settings for the job include: | |
# - defer - defer this job to itself (will always refer to the most recently modified version of production) | |
# - commands - ensure you're using the state:modified+ selector to only run what's been modified | |
# since the last successful run for the job you're deferring to | |
name: Run Modified Job on Merge | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
run_on_merge: | |
runs-on: ubuntu-latest | |
env: | |
DBT_CLOUD_SERVICE_TOKEN: ${{ secrets.DBT_CLOUD_JOB_ADMIN }} | |
DBT_CLOUD_ACCOUNT_ID: 81398 | |
JOB_ID: 178312 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: "3.9.x" | |
- name: Restart Job from Failure | |
run: | | |
pip install dbtc==0.2.2 | |
dbtc trigger-job \ | |
--job-id=$JOB_ID \ | |
--payload='{"cause": "Merging code to main"}' \ | |
--no-should-poll |