ops: upload/download docker image
Some checks failed
ci / docker-build (pull_request) Successful in 36s
ci / build-and-test (pull_request) Failing after 29s

This commit is contained in:
Brock Allen
2024-02-04 01:11:29 +00:00
parent 2c9bb098c6
commit 39b80e370d

View File

@@ -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