Skip to content

Lock file maintenance #1358

Lock file maintenance

Lock file maintenance #1358

name: Prevent Database Migration Files Deletion
on:
pull_request_target:
branches: [main]
jobs:
prevent-migrations-deletion:
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- name: Prevent migrations files being changed or deleted
uses: xalvarez/prevent-file-change-action@v2.0.0
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
pattern: '.*\/db\/.+\/migrations\/\d{4}\w*\.py$'
allowNewFiles: true