Include batch details in batch mismatch error (#2483) #2443
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci-migrations | |
on: | |
push: | |
branches: [ main, release/** ] | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
janus_migrations: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Check that existing migrations have not changed | |
if: | | |
github.event_name == 'pull_request' && | |
!contains(github.event.pull_request.labels.*.name, 'allow-changed-migrations') | |
env: | |
BASE_SHA: "${{ github.event.pull_request.base.sha }}" | |
run: | | |
# --diff-filter=a includes all differences except added files. | |
if ! git diff --exit-code --diff-filter=a "$BASE_SHA" ./db; then | |
echo "fatal: migrations cannot be modified or removed, only added" | |
exit 1 | |
fi | |
- name: Check validity of migrations | |
uses: "./.github/actions/validate-migrations" |