ops: upload/download docker image
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user