From 39b80e370d2a9922bfeb063d97acaca2577bda84 Mon Sep 17 00:00:00 2001 From: Brock Allen Date: Sun, 4 Feb 2024 01:11:29 +0000 Subject: [PATCH] ops: upload/download docker image --- .gitea/workflows/ci.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 5d59502..2a3beac 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -44,6 +44,14 @@ jobs: file: builder.Dockerfile tags: cproject-builder:latest outputs: type=docker,dest=/tmp/docker/${{ runner.os }}-builder-image.tar + - + name: Upload docker image + if: steps.cache-docker.outputs.cache-hit != 'true' + uses: actions/upload-artifact@v3 + with: + name: ${{ runner.os }}-docker-${{ steps.dockerfile-hash.outputs.hash }} + path: /tmp/docker/${{ runner.os }}-builder-image.tar + retention-days: 3 build-and-test: runs-on: ubuntu-latest @@ -61,12 +69,11 @@ jobs: with: patterns: builder.Dockerfile - - name: Restore docker image - id: cache-docker - uses: actions/cache@v3 + name: Downlaod docker image + uses: actions/download-artifact@v3 with: - path: /tmp/docker - key: ${{ runner.os }}-docker-${{ steps.dockerfile-hash.outputs.hash }} + name: ${{ runner.os }}-docker-${{ steps.dockerfile-hash.outputs.hash }} + path: /tmp/docker/${{ runner.os }}-builder-image.tar - name: Build library uses: https://git.brocklobsta.net/brock/docker-run-action@v4