-
Notifications
You must be signed in to change notification settings - Fork 441
48 lines (43 loc) · 1.68 KB
/
warn_about_migrations.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Warn about migrations
on:
workflow_run:
workflows: ['Set warnings about migrations']
types:
- completed
permissions:
contents: read
jobs:
comment_on_pr:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Download artifacts
uses: dawidd6/action-download-artifact@v7
with:
workflow: ${{ github.event.workflow_run.workflow_id }}
workflow_conclusion: success
- name: Fetch PR number from artifacts
run: |
echo "pr_number=$(cat migrations_artifacts/pr_number.txt)" >> $GITHUB_ENV
- name: Add comment about migration to PR
uses: thollander/actions-comment-pull-request@v3
if: ${{ hashFiles('migrations_artifacts/comment_text_migrations.txt') != '' }}
with:
filePath: migrations_artifacts/comment_text_migrations.txt
pr_number: ${{ env.pr_number }}
comment_tag: comment_about_migrations
- name: Add comment about missing db schema to PR
uses: thollander/actions-comment-pull-request@v3
if: ${{ hashFiles('migrations_artifacts/comment_text_db_schema.txt') != '' }}
with:
filePath: migrations_artifacts/comment_text_db_schema.txt
pr_number: ${{ env.pr_number }}
comment_tag: comment_about_db_schema
- name: Add comment about missing data schema to PR
uses: thollander/actions-comment-pull-request@v3
if: ${{ hashFiles('migrations_artifacts/comment_text_data_schema.txt') != '' }}
with:
filePath: migrations_artifacts/comment_text_data_schema.txt
pr_number: ${{ env.pr_number }}
comment_tag: comment_about_data_schema