From d32c67370f4ad08a40c476fc810db2a8ee854aa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C5=A0tefka?= Date: Wed, 17 Apr 2024 18:38:05 +0200 Subject: [PATCH] fix(ci/cd): Use cache, Luacheck not working on Gitea (#47) * feat(ci/cd): Make workflows compatible with medium act images for reference: https://nektosact.com/usage/runners.html * fix(ci/cd): use sudo to install cargo * fix(ci/cd): Luacheck failing install on Gitea Install luacheck using apt and cache the install * feat(ci/cd): Cache apt install cargo * fix(ci/cd): remove unnecessary comments * [69] Make workflow compatible with medium act images https://openproject.stefka.eu/work_packages/69 --- .github/workflows/luacheck.yml | 8 +++++++- .github/workflows/stylua.yml | 6 +++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/luacheck.yml b/.github/workflows/luacheck.yml index 87145d9..932d7a5 100644 --- a/.github/workflows/luacheck.yml +++ b/.github/workflows/luacheck.yml @@ -4,7 +4,13 @@ jobs: Luacheck: runs-on: ubuntu-latest steps: + - name: Update repositories + run: sudo apt update + - name: Install luarocks + uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: lua-check - name: Checkout uses: actions/checkout@v3 - name: Luacheck linter - uses: lunarmodules/luacheck@v1 + run: luacheck --config .luacheckrc . diff --git a/.github/workflows/stylua.yml b/.github/workflows/stylua.yml index e97113c..c941983 100644 --- a/.github/workflows/stylua.yml +++ b/.github/workflows/stylua.yml @@ -4,8 +4,12 @@ jobs: StyLuacheck: runs-on: ubuntu-latest steps: + - name: Update repositories + run: sudo apt update - name: Install cargo - run: sudo apt update && sudo apt install -y cargo + uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: cargo - name: Install StyLua from crates.io uses: baptiste0928/cargo-install@v3