-
-
Notifications
You must be signed in to change notification settings - Fork 647
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
35 additions
and
36 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,39 @@ | ||
--- | ||
on: | ||
workflow_run: | ||
workflows: [Lua-format] | ||
types: [completed] | ||
on: | ||
workflow_run: | ||
workflows: ["Lua-format"] | ||
types: [completed] | ||
|
||
jobs: | ||
on-failure: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'failure' }} | ||
steps: | ||
jobs: | ||
on-failure: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.event == 'pull_request' && 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 }} | ||
|
||
- 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: . | ||
|
||
- 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 }} | ||
- 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 }} |