[pre-commit.ci] pre-commit autoupdate #94
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Format with Stylua | |
on: | |
push: | |
paths: | |
- "**.lua" | |
workflow_dispatch: | |
jobs: | |
format_code: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Run Stylua | |
uses: JohnnyMorganz/stylua-action@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
version: latest | |
args: . | |
# Import GPG key for signing commits | |
- name: Import GPG key | |
id: import-gpg | |
uses: crazy-max/ghaction-import-gpg@v6 | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.PASSPHRASE }} | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
- name: Commit and push changes | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: "format lua code with stylua" | |
commit_author: "${{ steps.import-gpg.outputs.name }} <${{ steps.import-gpg.outputs.email }}>" | |
commit_user_name: ${{ steps.import-gpg.outputs.name }} | |
commit_user_email: ${{ steps.import-gpg.outputs.email }} |