- Notifications
You must be signed in to change notification settings - Fork12
Github Action for Linting Postgres Migrations with Squawk
NotificationsYou must be signed in to change notification settings
sbdchd/squawk-action
Use this GitHub action with your project
Add this Action to an existing workflow or create a new oneFolders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A GitHub Action forSquawk.
Lint Postgres migrations and report violations as a comment in a GitHub Pull Request (example PR).
For more information on Squawk, see theSquawk GitHub repository orwebsite.
Lint every .sql file inmigrations/
on every pull request.
# .github/workflows/lint-migrations.ymlname:Lint Migrationson:pull_requestjobs:lint_migrations:runs-on:ubuntu-lateststeps: -uses:actions/checkout@v4 -uses:sbdchd/squawk-action@v2with:pattern:"migrations/*.sql"version:"latest"
Only lint modified .sql files in themigrations/
.
# .github/workflows/lint-migrations.ymlname:Lint Migrationson:pull_requestjobs:lint_migrations:runs-on:ubuntu-lateststeps: -uses:actions/checkout@v4with:fetch-depth:0 -name:Find modified migrationsrun:| modified_migrations=$(git diff --diff-filter=d --name-only origin/$GITHUB_BASE_REF...origin/$GITHUB_HEAD_REF 'migrations/*.sql') echo "$modified_migrations" echo "file_names=$modified_migrations" >> $GITHUB_OUTPUTid:modified-migrations -uses:sbdchd/squawk-action@v2with:files:${{ steps.modified-migrations.outputs.file_names }}
Tip
Seeaction.yml
for more action inputs.
- Release a new version (e.g. v5.2.1)
- Update major version tag to point to commit.
git tag v5git push --tags
About
Github Action for Linting Postgres Migrations with Squawk
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.