ci: remove external actions dependencies for forgejo
This commit is contained in:
parent
f7d4ab5596
commit
0af2677f25
2 changed files with 30 additions and 14 deletions
27
.github/workflows/luacheck.yaml
vendored
27
.github/workflows/luacheck.yaml
vendored
|
|
@ -10,12 +10,23 @@ on:
|
|||
|
||||
jobs:
|
||||
luacheck:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: leafo/gh-actions-lua@v10
|
||||
with:
|
||||
luaVersion: "5.1"
|
||||
- uses: leafo/gh-actions-luarocks@v4
|
||||
- run: luarocks install luacheck
|
||||
- run: luacheck .
|
||||
- name: Checkout
|
||||
run: git clone --depth=1 $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git .
|
||||
- name: Install Luacheck
|
||||
run: |
|
||||
if ! command -v luacheck &> /dev/null; then
|
||||
if command -v luarocks &> /dev/null; then
|
||||
luarocks install luacheck
|
||||
else
|
||||
curl -L -o luacheck.tar.gz "https://github.com/lunarmodules/luacheck/archive/refs/tags/v1.1.2.tar.gz"
|
||||
tar -xzf luacheck.tar.gz
|
||||
cd luacheck-*
|
||||
make install
|
||||
cd ..
|
||||
rm -rf luacheck-*
|
||||
fi
|
||||
fi
|
||||
- name: Run Luacheck
|
||||
run: luacheck .
|
||||
|
|
|
|||
17
.github/workflows/stylua.yaml
vendored
17
.github/workflows/stylua.yaml
vendored
|
|
@ -12,9 +12,14 @@ jobs:
|
|||
stylua:
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: JohnnyMorganz/stylua-action@v4
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
version: latest
|
||||
args: --check .
|
||||
- name: Checkout
|
||||
run: git clone --depth=1 $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git .
|
||||
- name: Install StyLua
|
||||
run: |
|
||||
if ! command -v stylua &> /dev/null; then
|
||||
curl -L -o stylua.zip "https://github.com/JohnnyMorganz/StyLua/releases/latest/download/stylua-$(uname -s)-$(uname -m).zip"
|
||||
unzip stylua.zip -d /usr/local/bin
|
||||
rm stylua.zip
|
||||
fi
|
||||
- name: Check Formatting
|
||||
run: stylua --check .
|
||||
|
|
|
|||
Loading…
Reference in a new issue