Skip to content

Big documentation update #3359

Big documentation update

Big documentation update #3359

name: Prevent deletion of database migration files
"on":
pull_request_target: # zizmor: ignore[dangerous-triggers]
branches: [main]
concurrency: # yamllint disable-line rule:key-ordering
cancel-in-progress: true
group: ${{github.workflow}}-${{github.event.pull_request.number || github.ref}}
permissions:
pull-requests: read # Needed to check if a pull request includes the deletion of a migration file
jobs:
prevent-migrations-deletion:
name: Prevent deletion of database migration files
runs-on: ubuntu-latest
steps:
- uses: xalvarez/prevent-file-change-action@v3.0.1
with:
allowNewFiles: true
githubToken: ${{secrets.GITHUB_TOKEN}}
pattern: .*\/db\/.+\/migrations\/\d{4}\w*\.py$