mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-04 16:09:05 +00:00
## Summary - Add a script to detect newly added database migrations. - Require `DB_SCHEMA_VERSION` to increase when migrations are added. - Run the check for pull requests and merge queue events with full Git history. ## Testing - Not run (not requested)
31 lines
848 B
YAML
31 lines
848 B
YAML
name: DB Schema Version Check
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- "**"
|
|
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:
|
|
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"
|