-
Notifications
You must be signed in to change notification settings - Fork 37
40 lines (34 loc) · 1.09 KB
/
notifyMigrationChanges.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
name: Notify migration changes
on:
pull_request_target:
branches: [main]
paths: [backend/api/Migrations/**]
env:
message: |
:bell: Migrations changes detected :bell:
:mega: Remember to comment "/UpdateDatabase" after review approval for migrations to take effect!
jobs:
Notify_Migration:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Check for previous comment
id: notify_comment_search
uses: peter-evans/find-comment@v2
with:
issue-number: ${{ github.event.number }}
body-includes: ${{ env.message }}
- name: Add comment if no comment exists
if: ${{ !steps.notify_comment_search.outputs.comment-body }}
uses: peter-evans/create-or-update-comment@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.number }}
body: ${{ env.message }}
- name: Add label
uses: actions-ecosystem/action-add-labels@v1
with:
labels: database-change