feat(github): Disable schema-diff for PRs in draft state (#4110)

This commit is contained in:
Hugo authored and GitHub committed 2023-12-07 16:59:34 +00:00
1 parent 9952910828
commit cf71ae042c
1 file changed
+12
+12
View File
@@ -2,6 +2,17 @@ name: schema-diff
on:
pull_request:
types:
# By default, a workflow only runs when a pull_request event's activity
# type is `opened`, `synchronize`, or `reopened`.
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
# Since we care about the PR state, we also need to run when there is a PR
# state change: From "Draft" to "Ready for Review" and vice-versa.
- 'opened'
- 'synchronize'
- 'reopened'
- 'converted_to_draft'
- 'ready_for_review'
paths:
- 'internal/db/schema/migrations/**/*.sql'
- 'scripts/schema-diff.sh'
@@ -16,6 +27,7 @@ permissions:
jobs:
schema-diff:
name: "Schema Diff"
if: '! github.event.pull_request.draft'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1