Skip to content

Add K-Lab to initDB #3596

Add K-Lab to initDB

Add K-Lab to initDB #3596

name: Verify migrations
on:
pull_request_target:
branches: [main]
env:
success_message: ":sparkles: Successfully ran migration command! :sparkles:"
jobs:
VerifyMigrations:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request_target' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get changed files in the migrations folder
id: changed-files-specific
uses: tj-actions/[email protected]
with:
files: backend/api/Migrations/**
sha: ${{ github.event.pull_request.head.sha }}
- name: If files changed, check for database success
if: ${{ steps.changed-files-specific.outputs.any_changed == 'true' }}
id: database_comment_search
uses: peter-evans/find-comment@v3
with:
issue-number: ${{ github.event.number }}
body-includes: ${{ env.success_message }}
comment-author: github-actions[bot]
- name: Fail if files changed & no database success (comment not found)
if: |
steps.changed-files-specific.outputs.any_changed == 'true' &&
!steps.database_comment_search.outputs.comment-body
run: exit 1