Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Migration actions
name: Notify migrations on PR

on:
workflow_call:
Expand All @@ -17,9 +17,6 @@ permissions:
pull-requests: write
issues: write

env:
update_success_message: ":sparkles: Successfully ran migration command! :sparkles:"

jobs:
download:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -93,22 +90,3 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ needs.download.outputs.pr_number }}

verify_migrations:
needs: download
runs-on: ubuntu-latest
steps:
- name: Check for database success comment
if: needs.download.outputs.migrations_changed == 'true'
id: database_comment_search
uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad #v4
with:
issue-number: ${{ needs.download.outputs.pr_number }}
body-includes: ${{ env.update_success_message }}
comment-author: github-actions[bot]

- name: Fail if database not updated
if: >-
needs.download.outputs.migrations_changed == 'true' &&
!steps.database_comment_search.outputs.comment-body
run: exit 1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Migration checks
name: Verify migrations

on:
workflow_call:
Expand All @@ -14,10 +14,17 @@ on:

permissions:
contents: read
pull-requests: read
issues: read

env:
update_success_message: ":sparkles: Successfully ran migration command! :sparkles:"

jobs:
check_changes:
runs-on: ubuntu-latest
outputs:
migrations_changed: ${{ steps.migration_changes.outputs.any_changed }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6
Expand Down Expand Up @@ -49,3 +56,22 @@ jobs:
with:
name: migration-check-results
path: migration-check-results.json

verify_migrations:
needs: check_changes
runs-on: ubuntu-latest
steps:
- name: Check for database success comment
if: needs.check_changes.outputs.migrations_changed == 'true'
id: database_comment_search
uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad #v4
with:
issue-number: ${{ github.event.pull_request.number }}
body-includes: ${{ env.update_success_message }}
comment-author: github-actions[bot]

- name: Fail if database not updated
if: >-
needs.check_changes.outputs.migrations_changed == 'true' &&
!steps.database_comment_search.outputs.comment-body
run: exit 1
Loading