Skip to content

Merge pull request #67 from kartoza/fix/ci-uses-flake #24

Merge pull request #67 from kartoza/fix/ci-uses-flake

Merge pull request #67 from kartoza/fix/ci-uses-flake #24

# SPDX-FileCopyrightText: Tim Sutton
# SPDX-License-Identifier: MIT
name: 🔒 Schema Immutability
on:
pull_request:
push:
branches: [main, master]
tags: ['v*']
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout (full history)
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v22
- name: Determine comparison base
id: base
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
echo "ref=${{ github.event.pull_request.base.sha }}" >> "$GITHUB_OUTPUT"
else
# For pushes to main and tag pushes, compare against the previous commit.
echo "ref=HEAD^" >> "$GITHUB_OUTPUT"
fi
- name: Run schema-immutability checker
run: |
nix develop .#minimal --command \
bash scripts/check_schema_immutability.sh --base "${{ steps.base.outputs.ref }}"