Add exception handling to blob store interactions #3870
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |