action-prettier.yml 811 B

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