From 32c4d571db35ac09b0f418e494eb7fe902ef1af1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E6=B5=A9?= <37316281+yanhao98@users.noreply.github.com> Date: Tue, 8 Oct 2024 22:25:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=20docker-build-push@main=20?= =?UTF-8?q?=E7=9A=84=20load:=20true?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 1 + docker-build-push/action.yml | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e6673a..3885de2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,6 +24,7 @@ jobs: login_password: ${{ secrets.DOCKERHUB_TOKEN }} build_push: false build_file: ./docker-build-push/Dockerfile + build_load: true # - name: Check Docker image # run: | # set -x diff --git a/docker-build-push/action.yml b/docker-build-push/action.yml index e2a450a..f4d2bbb 100644 --- a/docker-build-push/action.yml +++ b/docker-build-push/action.yml @@ -27,6 +27,10 @@ inputs: description: "是否推送 Docker 镜像" default: "true" required: false + build_load: + description: "是否加载 Docker 镜像" + default: "false" + required: false runs: using: "composite" steps: @@ -51,7 +55,10 @@ runs: context: ${{ inputs.build_context }} platforms: ${{ inputs.build_platforms }} push: ${{ inputs.build_push }} + load: ${{ inputs.build_load }} # tags: ${{ steps.meta.outputs.tags }} # labels: ${{ steps.meta.outputs.labels }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache \ No newline at end of file + cache-from: type=gha + cache-to: type=gha,mode=max + # cache-from: type=local,src=/tmp/.buildx-cache + # cache-to: type=local,dest=/tmp/.buildx-cache \ No newline at end of file