ci: prevent edits to existing migrations
CI / 🧪 Tests Laravel (push) Successful in 2m24s
CI / 🐳 Build & Push Images (push) Successful in 1m5s

This commit is contained in:
2026-08-16 13:16:15 +02:00
parent f752c28d99
commit 7aa5c4e659
2 changed files with 50 additions and 0 deletions
+18
View File
@@ -9,6 +9,7 @@ on:
pull_request:
branches:
- main
- develop
jobs:
test:
name: 🧪 Tests Laravel
@@ -19,6 +20,23 @@ jobs:
steps:
- name: 📥 Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 🔒 Vérifier limmutabilité des migrations
env:
EVENT_NAME: ${{ github.event_name }}
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
PUSH_BASE_SHA: ${{ github.event.before }}
run: |
case "$EVENT_NAME" in
pull_request) base_sha="$PR_BASE_SHA" ;;
push) base_sha="$PUSH_BASE_SHA" ;;
*) echo "Événement non supporté : $EVENT_NAME"; exit 1 ;;
esac
sh scripts/ci/check-migration-immutability.sh "$base_sha"
- name: 🐘 Setup PHP
uses: shivammathur/setup-php@v2
with: