ops: upload/download docker image
This commit is contained in:
@@ -44,6 +44,14 @@ jobs:
|
|||||||
file: builder.Dockerfile
|
file: builder.Dockerfile
|
||||||
tags: cproject-builder:latest
|
tags: cproject-builder:latest
|
||||||
outputs: type=docker,dest=/tmp/docker/${{ runner.os }}-builder-image.tar
|
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:
|
build-and-test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -61,12 +69,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
patterns: builder.Dockerfile
|
patterns: builder.Dockerfile
|
||||||
-
|
-
|
||||||
name: Restore docker image
|
name: Downlaod docker image
|
||||||
id: cache-docker
|
uses: actions/download-artifact@v3
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
with:
|
||||||
path: /tmp/docker
|
name: ${{ runner.os }}-docker-${{ steps.dockerfile-hash.outputs.hash }}
|
||||||
key: ${{ runner.os }}-docker-${{ steps.dockerfile-hash.outputs.hash }}
|
path: /tmp/docker/${{ runner.os }}-builder-image.tar
|
||||||
-
|
-
|
||||||
name: Build library
|
name: Build library
|
||||||
uses: https://git.brocklobsta.net/brock/docker-run-action@v4
|
uses: https://git.brocklobsta.net/brock/docker-run-action@v4
|
||||||
|
|||||||
Reference in New Issue
Block a user