-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
67 additions
and
6 deletions.
There are no files selected for viewing
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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Plan for syncing dbt Cloud Jobs from YAML | ||
run-name: Running dbt-jobs-as-code plan to see what is going to be changed/deleted | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- qa | ||
paths: | ||
- 'jobs/**' # Only trigger the workflow if files under the jobs/ directory are modified | ||
|
||
jobs: | ||
run-python-script: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.12.x" | ||
|
||
- name: Install dbt-jobs-as-code | ||
run: pip install dbt-jobs-as-code~=0.6.0 | ||
|
||
- name: Run dbt-jobs-as-code | ||
run: dbt-jobs-as-code plan jobs/jobs.yml --vars-yml jobs/vars_qa.yml --limit-projects-envs-to-yml | ||
env: | ||
DBT_API_KEY: "${{secrets.DBT_API_KEY}}" | ||
# DBT_BASE_URL is optional | ||
# DBT_BASE_URL: "${{secrets.DBT_BASE_URL}}" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Replicate dbt Cloud Jobs from YAML | ||
run-name: Running dbt-jobs-as-code sync to replicate dbt Cloud jobs from YAML | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
branches: | ||
- qa | ||
paths: | ||
- 'jobs/**' # Only trigger the workflow if files under the jobs/ directory are modified | ||
|
||
jobs: | ||
run-python-script: | ||
if: github.event.pull_request.merged == true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.12.x" | ||
|
||
- name: Install dbt-jobs-as-code | ||
run: pip install dbt-jobs-as-code~=0.6.0 | ||
|
||
- name: Run dbt-jobs-as-code | ||
run: dbt-jobs-as-code sync jobs/jobs.yml --vars-yml jobs/vars_qa.yml --limit-projects-envs-to-yml | ||
env: | ||
DBT_API_KEY: "${{secrets.DBT_API_KEY}}" | ||
# DBT_BASE_URL is optional | ||
# DBT_BASE_URL: "${{secrets.DBT_BASE_URL}}" |