Skip to content

Commit

Permalink
add: lua format workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Costallat committed Aug 15, 2024
1 parent ac83406 commit 0822a16
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/lua-format-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
on:

Check failure on line 2 in .github/workflows/lua-format-workflow.yml

View workflow job for this annotation

GitHub Actions / yamllint

[yamllint] reported by reviewdog 🐶 [error] wrong indentation: expected 0 but found 2 (indentation) Raw Output: ./.github/workflows/lua-format-workflow.yml:2:3: [error] wrong indentation: expected 0 but found 2 (indentation)
workflow_run:
workflows: [Lua-format]
types: [completed]

jobs:
on-failure:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:

- name: Set up Git
if: ${{ github.ref != 'refs/heads/main' }}
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "GitHub Actions"
- name: Actions checkout
if: ${{ github.ref != 'refs/heads/main' }}
uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.GITHUB_TOKEN }}

- uses: JohnnyMorganz/stylua-action@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: .

- name: Run add and commit
if: ${{ github.ref != 'refs/heads/main' }}
uses: EndBug/add-and-commit@v9
with:
author_name: GitHub Actions
author_email: github-actions[bot]@users.noreply.github.com
message: "Lua code format - (Stylua)"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 0822a16

Please sign in to comment.