From f14ae7ef524f3000ed76c325febaf9ebb972f668 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C5=A0tefka?= Date: Mon, 8 Apr 2024 12:28:57 +0200 Subject: [PATCH] fix(ci/cd): Move StyLua from action to cargo + command (#40) * fix(ci/cd): Move StyLua from action to cargo + command [#68] StyLUA check is not working for PRs from forks https://openproject.stefka.eu/work_packages/68 * fix(formatting): fix bad formatting from #39 --- .github/workflows/stylua.yml | 15 ++++++++------- lua/presence/plugin_managers.lua | 6 +++--- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/stylua.yml b/.github/workflows/stylua.yml index 639c7e1..b9b143d 100644 --- a/.github/workflows/stylua.yml +++ b/.github/workflows/stylua.yml @@ -4,12 +4,13 @@ jobs: StyLuacheck: runs-on: ubuntu-latest steps: + - name: Install cargo-hack from crates.io + uses: baptiste0928/cargo-install@v3 + with: + crate: stylua + version: 0.20.0 + - name: Checkout uses: actions/checkout@v3 - - name: StyLua check - uses: JohnnyMorganz/stylua-action@v3 - with: - token: ${{ secrets.GH_TOKEN }} - version: v0.18.2 # NOTE: we recommend pinning to a specific version in case of formatting changes - # CLI arguments - args: --check . + - name: Check code formatting + run: stylua -c . diff --git a/lua/presence/plugin_managers.lua b/lua/presence/plugin_managers.lua index c6301eb..6d86cf7 100644 --- a/lua/presence/plugin_managers.lua +++ b/lua/presence/plugin_managers.lua @@ -1,6 +1,6 @@ -- Different plugin manager names return { - ["packer"] = "packer", - ["vim-plug"] = "vim-plug", - ["lazy"] = "lazy", + ["packer"] = "packer", + ["vim-plug"] = "vim-plug", + ["lazy"] = "lazy", }