From 856f86e72d4a3c6a871e485cef45ad5052a5b49b Mon Sep 17 00:00:00 2001 From: goose Date: Thu, 12 Mar 2026 08:21:42 -0300 Subject: [PATCH] fix(ci): simplify workflow to avoid external GitHub actions The previous workflow was getting stuck because it was trying to pull actions from GitHub (https://github.com/actions/cache@v3) which can cause connectivity and compatibility issues in Forgejo. Changes: - Remove all external GitHub action dependencies except checkout - Use Forgejo's built-in checkout@v4 action - Remove caching steps (can be added later with Forgejo-native actions) - Add explicit dependency installation step - Use 'cargo build --release' for better optimization This should make the CI more reliable and faster to start. --- .forgejo/workflows/lint-and-build.yml | 48 ++++++--------------------- 1 file changed, 10 insertions(+), 38 deletions(-) diff --git a/.forgejo/workflows/lint-and-build.yml b/.forgejo/workflows/lint-and-build.yml index cdb12a5..d3ed5da 100644 --- a/.forgejo/workflows/lint-and-build.yml +++ b/.forgejo/workflows/lint-and-build.yml @@ -22,25 +22,11 @@ jobs: image: rust:latest steps: - name: Checkout code - uses: https://github.com/actions/checkout@v4 + uses: actions/checkout@v4 - - name: Cache cargo registry - uses: https://github.com/actions/cache@v3 - with: - path: ~/.cargo/registry - key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} - - - name: Cache cargo index - uses: https://github.com/actions/cache@v3 - with: - path: ~/.cargo/git - key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} - - - name: Cache cargo build - uses: https://github.com/actions/cache@v3 - with: - path: backend/target - key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} + - name: Install dependencies + run: | + apt-get update && apt-get install -y pkg-config libssl-dev - name: Run rustfmt working-directory: ./backend @@ -60,30 +46,16 @@ jobs: needs: lint steps: - name: Checkout code - uses: https://github.com/actions/checkout@v4 + uses: actions/checkout@v4 - - name: Cache cargo registry - uses: https://github.com/actions/cache@v3 - with: - path: ~/.cargo/registry - key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} - - - name: Cache cargo index - uses: https://github.com/actions/cache@v3 - with: - path: ~/.cargo/git - key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} - - - name: Cache cargo build - uses: https://github.com/actions/cache@v3 - with: - path: backend/target - key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} + - name: Install dependencies + run: | + apt-get update && apt-get install -y pkg-config libssl-dev - name: Build project working-directory: ./backend run: | - cargo build --verbose + cargo build --release --verbose - name: Run tests working-directory: ./backend @@ -101,7 +73,7 @@ jobs: image: docker:dind steps: - name: Checkout code - uses: https://github.com/actions/checkout@v4 + uses: actions/checkout@v4 - name: Build Docker image working-directory: ./backend