mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-02 19:58:59 +00:00
feat(ci): use docker registry cache (#8544)
This commit is contained in:
parent
637a6aef18
commit
e157992b77
@ -49,7 +49,7 @@ runs:
|
||||
# add git short SHA as Docker tag
|
||||
tag-custom: ${{ inputs.tags }}
|
||||
tag-custom-only: true
|
||||
|
||||
|
||||
# Code for testing the build when not pushing to Docker Hub.
|
||||
- name: Build and Load image for testing (if not publishing)
|
||||
uses: docker/build-push-action@v3
|
||||
@ -64,12 +64,14 @@ runs:
|
||||
tags: ${{ steps.docker_meta.outputs.tags }}
|
||||
load: true
|
||||
push: false
|
||||
cache-from: type=registry,ref=${{ steps.docker_meta.outputs.tags }}
|
||||
cache-to: type=inline
|
||||
- name: Upload image locally for testing (if not publishing)
|
||||
uses: ishworkh/docker-image-artifact-upload@v1
|
||||
if: ${{ inputs.publish != 'true' }}
|
||||
with:
|
||||
image: ${{ steps.docker_meta.outputs.tags }}
|
||||
|
||||
|
||||
# Code for building multi-platform images and pushing to Docker Hub.
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
@ -93,5 +95,7 @@ runs:
|
||||
build-args: ${{ inputs.build-args }}
|
||||
tags: ${{ steps.docker_meta.outputs.tags }}
|
||||
push: true
|
||||
cache-from: type=registry,ref=${{ steps.docker_meta.outputs.tags }}
|
||||
cache-to: type=inline
|
||||
|
||||
# TODO add code for vuln scanning?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user