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

pull/4130/head
Hugo 2 years ago committed by GitHub
parent 9952910828
commit cf71ae042c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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

Loading…
Cancel
Save