From e620a3e38840497c2a17a4c35ea7c7ce5f89094d Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Fri, 25 Oct 2024 11:26:13 +0200 Subject: [PATCH] Use docker's native github actions caching --- .github/workflows/ci.yaml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e48ef5905..c7cc6f6f7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -3,7 +3,7 @@ name: CI on: push: branches: - - main + #- main pull_request: merge_group: branches: @@ -22,13 +22,6 @@ jobs: - name: set up docker buildx run: docker buildx create --name builder --use - - name: cache docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: docker-buildx-rs-${{ github.sha }} - restore-keys: docker-buildx-rs- - - name: Rust Cache uses: Swatinem/rust-cache@v2 with: @@ -39,6 +32,18 @@ jobs: - name: Register rust problem matcher run: echo "::add-matcher::.github/problem-matchers/rust.json" + - name: Build and cache + uses: docker/build-push-action@v6 + env: + DOCKER_BUILD_SUMMARY: false + DOCKER_BUILD_RECORD_UPLOAD: false + with: + tags: sudo-test-rs + load: true + cache-from: type=gha + cache-to: type=gha,mode=max + file: test-framework/sudo-test/src/ours.Dockerfile + - name: Run all E2E tests working-directory: test-framework run: cargo test -p e2e-tests