From 8117a074d563361dca6bb0070f67e6046e6186e3 Mon Sep 17 00:00:00 2001 From: jiriks74 Date: Thu, 12 Dec 2024 16:42:27 +0100 Subject: [PATCH] fix(ci): Use submodules for actions I've moved to forgejo which uses https://code.forgejo.org/actions/ by default --- .github/workflows/actions/cache-apt-pkgs-action | 1 + .github/workflows/actions/cargo-install | 1 + .github/workflows/luacheck.yml | 9 ++++++--- .github/workflows/stylua.yml | 11 +++++++---- .gitmodules | 8 ++++++++ 5 files changed, 23 insertions(+), 7 deletions(-) create mode 160000 .github/workflows/actions/cache-apt-pkgs-action create mode 160000 .github/workflows/actions/cargo-install create mode 100644 .gitmodules diff --git a/.github/workflows/actions/cache-apt-pkgs-action b/.github/workflows/actions/cache-apt-pkgs-action new file mode 160000 index 0000000..f2fc6d1 --- /dev/null +++ b/.github/workflows/actions/cache-apt-pkgs-action @@ -0,0 +1 @@ +Subproject commit f2fc6d1af4d6abf8a4dcd37fd74a9a15c2273b9f diff --git a/.github/workflows/actions/cargo-install b/.github/workflows/actions/cargo-install new file mode 160000 index 0000000..904927d --- /dev/null +++ b/.github/workflows/actions/cargo-install @@ -0,0 +1 @@ +Subproject commit 904927dbe77864e0f2281519fe9d5bd097a220b3 diff --git a/.github/workflows/luacheck.yml b/.github/workflows/luacheck.yml index 39aea16..994c401 100644 --- a/.github/workflows/luacheck.yml +++ b/.github/workflows/luacheck.yml @@ -4,13 +4,16 @@ jobs: Luacheck: runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: true + - name: Update repositories run: sudo apt update - name: Install Luacheck - uses: awalsh128/cache-apt-pkgs-action@latest + uses: ./.github/workflows/actions/cache-apt-pkgs-action with: packages: lua-check - - name: Checkout - uses: actions/checkout@v4 - name: Luacheck linter run: luacheck --config .luacheckrc . diff --git a/.github/workflows/stylua.yml b/.github/workflows/stylua.yml index 7035a8b..400c45c 100644 --- a/.github/workflows/stylua.yml +++ b/.github/workflows/stylua.yml @@ -4,20 +4,23 @@ jobs: StyLua: runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: true + - name: Update repositories run: sudo apt update - name: Install cargo - uses: awalsh128/cache-apt-pkgs-action@latest + uses: ./.github/workflows/actions/cache-apt-pkgs-action with: packages: cargo libssh2-1 - name: Install StyLua from crates.io - uses: baptiste0928/cargo-install@v3 + uses: ./.github/workflows/actions/cargo-install with: crate: stylua version: 0.20.0 - - name: Checkout - uses: actions/checkout@v4 - name: Check code formatting run: stylua -c . diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..6ed5d13 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,8 @@ +[submodule ".github/workflows/actions/cache-apt-pkgs-action"] + path = .github/workflows/actions/cache-apt-pkgs-action + url = https://github.com/awalsh128/cache-apt-pkgs-action + branch = master +[submodule ".github/workflows/actions/cargo-install"] + path = .github/workflows/actions/cargo-install + url = https://github.com/baptiste0928/cargo-install + branch = main