ci: run stylua via npx rather than via action
All checks were successful
CI / Luacheck (pull_request) Successful in 21s
CI / StyLua (pull_request) Successful in 15s
CI / Cargo Format (pull_request) Successful in 19s
CI / Build and test (pull_request) Successful in 1m55s
Conventional Tools Commitlint / Commitlint (pull_request) Successful in 5s

Summary:

This is so we don't need the GITHUB_TOKEN that can not be added in forgejo. I
am giving it a go and the `GITHUB_` prefix is reserved for secrets. There are
also issues with the action in a forgejo environment due to the API not
resolving to github.

This now should work on both platforms. So we can maintain github compatibility
for any pull requests that may come that way.

Test Plan:

Run the CI on github and forgejo, this will need to be a manual process to
validate this works.
This commit is contained in:
Ade Attwood 2024-09-03 18:17:33 +01:00
parent 7efb98baab
commit e82227c427

View file

@ -29,11 +29,7 @@ jobs:
uses: actions/checkout@v4
- name: Run stylua
uses: JohnnyMorganz/stylua-action@v4.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: --check .
run: npx @johnnymorganz/stylua-bin --check .
cargo-format:
name: Cargo Format