name: DB Schema Version Check on: pull_request: branches: - "**" # labeled/unlabeled/ready_for_review/converted_to_draft so the gate re-evaluates when the state changes. types: [opened, reopened, synchronize, labeled, unlabeled, ready_for_review, converted_to_draft] merge_group: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.merge_group.head_ref || github.ref }} cancel-in-progress: true jobs: db_schema_version_check: # Nothing runs on a PR without the 'ready-for-ci' label, or on a draft; ci-gate alone reports the state. if: ${{ github.event_name != 'pull_request' || (contains(github.event.pull_request.labels.*.name, 'ready-for-ci') && github.event.pull_request.draft == false) }} name: db_schema_version_check runs-on: ubuntu-latest permissions: contents: read steps: - name: Checkout git repository uses: actions/checkout@v5 with: fetch-depth: 0 - name: Check DB schema version env: BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha }} HEAD_SHA: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }} run: bash .github/scripts/check-db-schema-version.sh "$BASE_SHA" "$HEAD_SHA"