-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (29 loc) · 919 Bytes
/
ci.yml
File metadata and controls
31 lines (29 loc) · 919 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: ci
on:
push:
branchs:
- main
env:
STYLUA_VERSION: 0.20.0
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Prepare stylua
run: |
curl -Lo /tmp/stylua-linux.zip https://github.com/JohnnyMorganz/StyLua/releases/download/v${STYLUA_VERSION}/stylua-linux.zip
unzip /tmp/stylua-linux.zip -d /tmp
chmod +x /tmp/stylua
- name: Execute stylua
run: /tmp/stylua --config-path .config/stylua/stylua.toml -g '.*/' -g '*.lua' -v .
- name: Check if there are any changes
id: check
continue-on-error: true
run: git diff --exit-code
- name: Create pull request if changed
if: ${{ steps.check.outcome == 'failure' }}
uses: peter-evans/create-pull-request@v7.0.5
with:
title: ':art: fix: format'
commit-message: ':art: fix: format'