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