Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/credfeto/action-sql-format
https://github.com/credfeto/action-sql-format
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/credfeto/action-sql-format
- Owner: credfeto
- License: mit
- Created: 2020-05-06T23:30:25.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-10T16:05:02.000Z (9 months ago)
- Last Synced: 2024-04-10T19:53:02.911Z (9 months ago)
- Language: Python
- Size: 2.34 MB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
# Reformat SQL Files
## How to use it?
This is a GitHub action, so it has to be added to a GitHub workflow.A simple example of running this action on all pushes to the repository would be to
add a `reformatsql.yml` file under `.github/workflows` with the following content```yaml
on: [push]jobs:
reformat-sql:
runs-on: ubuntu-latest
steps:
# Checkout the source code there are have some files to look at.
- uses: actions/[email protected]
with:
fetch-depth: 0
token: ${{secrets.SOURCE_PUSH_TOKEN}}
# Run the reformat action
- name: Reformat SQL Files
uses: credfeto/[email protected]
# Commit any changes to the repo
- uses: stefanzweifel/[email protected]
with:
commit_message: "[Reformat] SQL Files to common format"
file_pattern: "*.sql"
commit_user_name: "sqlfmt[bot]"
commit_user_email: "[email protected]"
commit_author: "sqlfmt[bot] "
skip_dirty_check: false
```On each push, it will reformat the SQL. Note you'll need to commit and push any commits back to your GithHub repo.
## Contributors