action-prettier.yml 738 B

1234567891011121314151617181920212223242526272829303132
  1. name: Prettier
  2. on:
  3. push:
  4. branches:
  5. - "*"
  6. concurrency:
  7. group: prettier-${{ github.ref }}
  8. cancel-in-progress: true
  9. permissions:
  10. contents: write
  11. jobs:
  12. prettier:
  13. runs-on: ubuntu-latest
  14. steps:
  15. - name: Checkout
  16. uses: actions/checkout@v5
  17. - name: Install Prettier and plugins
  18. run: |
  19. npm install --no-save prettier prettier-plugin-sh prettier-plugin-jinja-template
  20. - name: Prettify code
  21. uses: creyD/prettier_action@v4.6
  22. with:
  23. prettier_plugins: "prettier-plugin-sh prettier-plugin-jinja-template"
  24. prettier_options: --write .
  25. github_token: ${{ secrets.GITHUB_TOKEN }}
  26. commit_message: "chore(prettier): format code"