🐜 fix(CI): Caching fixes and improvements (#176)

Fixes previous PR

---------

Co-authored-by: DatCaptainHorse <DatCaptainHorse@users.noreply.github.com>
This commit is contained in:
Kristian Ollikainen
2025-01-31 22:22:26 +02:00
committed by GitHub
parent 29bc44ab83
commit 421aa70a7b
2 changed files with 144 additions and 241 deletions

View File

@@ -51,21 +51,6 @@ jobs:
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 20
-
name: Cache Rust artifacts
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
-
name: Cache mold linker
uses: actions/cache@v3
with:
path: /usr/bin/mold
key: ${{ runner.os }}-mold
-
name: Build Docker image
uses: docker/build-push-action@v5
@@ -75,6 +60,8 @@ jobs:
push: false
load: true
tags: nestri:runner
cache-from: type=gha,mode=max
cache-to: type=gha,mode=max
build-docker-main:
name: Build image on main
@@ -116,21 +103,6 @@ jobs:
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 20
-
name: Cache Rust artifacts
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
-
name: Cache mold linker
uses: actions/cache@v3
with:
path: /usr/bin/mold
key: ${{ runner.os }}-mold
-
name: Build Docker image
uses: docker/build-push-action@v5
@@ -140,3 +112,5 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha,mode=max
cache-to: type=gha,mode=max