Skip to content

Commit

Permalink
Merge pull request #6 from pvcy/jc/only-run-for-new-migrations
Browse files Browse the repository at this point in the history
Only run on new migrations
  • Loading branch information
john-craft authored Oct 24, 2023
2 parents 4ccba8c + ffd6cc5 commit 6fe42ae
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/test-migration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Standup Database and Test Migration
on:
pull_request:
branches: [ main ]
# paths:
# - 'users-api/src/migrations/**'
paths:
- 'users-api/src/migrations/**'

jobs:
check-migrations:
Expand Down Expand Up @@ -70,3 +70,15 @@ jobs:
- name: Cleanup
run: docker stop $DB_HOST

- name: Post a comment to PR
run: |
PR_COMMENT="This PR contains database migrations."
# Post the comment to the PR
curl \
-X POST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments \
-d "{\"body\":\"$PR_COMMENT\"}"

0 comments on commit 6fe42ae

Please sign in to comment.