From dae4d680bbe7f639e9a3ae16d46f8ffeed5278db Mon Sep 17 00:00:00 2001 From: goose Date: Wed, 11 Mar 2026 16:28:46 -0300 Subject: [PATCH] fix(ci): replace GitHub Actions with Forgejo-compatible workflow The original workflow was using GitHub-specific actions that don't exist in Forgejo, causing CI to fail immediately with: 'repository not found: Not Found' for actions-rs/toolchain@v1 Key changes: - Replace 'runs-on: docker' with 'runs-on: ubuntu-latest' and proper containers - Remove 'actions-rs/toolchain@v1' (doesn't exist in Forgejo) - Use 'rust:latest' container image instead which includes rustfmt, clippy, and cargo - Update all action references to use full URLs (https://github.com/...) - Use 'docker:dind' service for Docker-in-Docker support - Remove 'docker/setup-buildx-action@v3' (not needed for basic docker build) This workflow is now compatible with Forgejo and should run successfully. --- .forgejo/workflows/lint-and-build.yml | 51 +++++++++++---------------- 1 file changed, 21 insertions(+), 30 deletions(-) diff --git a/.forgejo/workflows/lint-and-build.yml b/.forgejo/workflows/lint-and-build.yml index eea8eea..cdb12a5 100644 --- a/.forgejo/workflows/lint-and-build.yml +++ b/.forgejo/workflows/lint-and-build.yml @@ -17,33 +17,27 @@ env: jobs: lint: name: Lint - runs-on: docker + runs-on: ubuntu-latest + container: + image: rust:latest steps: - name: Checkout code - uses: actions/checkout@v4 - - - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - components: rustfmt, clippy - override: true + uses: https://github.com/actions/checkout@v4 - name: Cache cargo registry - uses: actions/cache@v3 + uses: https://github.com/actions/cache@v3 with: path: ~/.cargo/registry key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo index - uses: actions/cache@v3 + uses: https://github.com/actions/cache@v3 with: path: ~/.cargo/git key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo build - uses: actions/cache@v3 + uses: https://github.com/actions/cache@v3 with: path: backend/target key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} @@ -60,33 +54,28 @@ jobs: build: name: Build - runs-on: docker + runs-on: ubuntu-latest + container: + image: rust:latest needs: lint steps: - name: Checkout code - uses: actions/checkout@v4 - - - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true + uses: https://github.com/actions/checkout@v4 - name: Cache cargo registry - uses: actions/cache@v3 + uses: https://github.com/actions/cache@v3 with: path: ~/.cargo/registry key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo index - uses: actions/cache@v3 + uses: https://github.com/actions/cache@v3 with: path: ~/.cargo/git key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} - name: Cache cargo build - uses: actions/cache@v3 + uses: https://github.com/actions/cache@v3 with: path: backend/target key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} @@ -103,14 +92,16 @@ jobs: docker-build: name: Docker Build - runs-on: docker + runs-on: ubuntu-latest + container: + image: docker:latest needs: build + services: + docker: + image: docker:dind steps: - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: https://github.com/actions/checkout@v4 - name: Build Docker image working-directory: ./backend