Skip to content

Commit ff020ab

Browse files
author
Noel Gomez
committed
add a comment to the PR with status
1 parent 4689e29 commit ff020ab

File tree

3 files changed

+51
-0
lines changed

3 files changed

+51
-0
lines changed

.github/workflows/10_feature_airflow_checks.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,20 @@ jobs:
8080
filePath: ${{ env.OUTPUT_FILE }}
8181
comment_tag: Custom Tests
8282
GITHUB_TOKEN: ${{ github.token }}
83+
84+
airflow-job-status:
85+
runs-on: ubuntu-latest
86+
needs: [airflow]
87+
if: always()
88+
steps:
89+
- name: Comment PR with Airflow status
90+
uses: thollander/actions-comment-pull-request@v2
91+
with:
92+
message: |
93+
## 🎯 Airflow Workflow Status
94+
- **Job**: Pull Request Airflow Tests → **${{ needs.airflow.result }}**
95+
96+
${{ needs.airflow.result == 'skipped' && '⏭️ _Skipped because no orchestrate/ files were changed_' || '' }}
97+
${{ needs.airflow.result == 'success' && '✅ _All orchestrate validations passed_' || '' }}
98+
${{ needs.airflow.result == 'failure' && '❌ _Orchestrate validations failed_' || '' }}
99+
comment_tag: airflow-workflow-status

.github/workflows/10_feature_dbt_checks.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,3 +139,20 @@ jobs:
139139
- name: Drop PR database on Failure to grant security access
140140
if: always() && (env.DATACOVES__DROP_DB_ON_FAIL == 'true') && (steps.grant-access-to-database.outcome == 'failure')
141141
run: "dbt --no-write-json run-operation drop_recreate_db --args '{db_name: ${{env.DATACOVES__MAIN__DATABASE}}, recreate: False}'" # yamllint disable-line rule:line-length
142+
143+
dbt-job-status:
144+
runs-on: ubuntu-latest
145+
needs: [dbt]
146+
if: always()
147+
steps:
148+
- name: Comment PR with dbt status
149+
uses: thollander/actions-comment-pull-request@v2
150+
with:
151+
message: |
152+
## 🧪 dbt Workflow Status
153+
- **Job**: Pull Request dbt Tests → **${{ needs.dbt.result }}**
154+
155+
${{ needs.dbt.result == 'skipped' && '⏭️ _Skipped because no transform/ files were changed_' || '' }}
156+
${{ needs.dbt.result == 'success' && '✅ _All dbt validations passed_' || '' }}
157+
${{ needs.dbt.result == 'failure' && '❌ _dbt validations failed_' || '' }}
158+
comment_tag: dbt-workflow-status

.github/workflows/20_release_dbt_checks.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,20 @@ jobs:
120120
# - name: Drop PR database on Failure to grant security access
121121
# if: always() && (env.DATACOVES__DROP_DB_ON_FAIL == 'true') && (steps.grant-access-to-database.outcome == 'failure')
122122
# run: "dbt --no-write-json run-operation drop_recreate_db --args '{db_name: ${{env.DATACOVES__MAIN__DATABASE}}, recreate: False}'" # yamllint disable-line rule:line-length
123+
124+
dbt-job-status:
125+
runs-on: ubuntu-latest
126+
needs: [dbt]
127+
if: always()
128+
steps:
129+
- name: Comment PR with dbt status
130+
uses: thollander/actions-comment-pull-request@v2
131+
with:
132+
message: |
133+
## 🧪 dbt Workflow Status
134+
- **Job**: Pull Request dbt Tests → **${{ needs.dbt.result }}**
135+
136+
${{ needs.dbt.result == 'skipped' && '⏭️ _Skipped because no transform/ files were changed_' || '' }}
137+
${{ needs.dbt.result == 'success' && '✅ _All dbt validations passed_' || '' }}
138+
${{ needs.dbt.result == 'failure' && '❌ _dbt validations failed_' || '' }}
139+
comment_tag: dbt-workflow-status

0 commit comments

Comments
 (0)