测试 docker-build-push@main 的 load: true

This commit is contained in:
严浩
2024-10-08 22:25:51 +08:00
committed by GitHub
parent 5e98b33939
commit 32c4d571db
2 changed files with 10 additions and 2 deletions

View File

@ -24,6 +24,7 @@ jobs:
login_password: ${{ secrets.DOCKERHUB_TOKEN }} login_password: ${{ secrets.DOCKERHUB_TOKEN }}
build_push: false build_push: false
build_file: ./docker-build-push/Dockerfile build_file: ./docker-build-push/Dockerfile
build_load: true
# - name: Check Docker image # - name: Check Docker image
# run: | # run: |
# set -x # set -x

View File

@ -27,6 +27,10 @@ inputs:
description: "是否推送 Docker 镜像" description: "是否推送 Docker 镜像"
default: "true" default: "true"
required: false required: false
build_load:
description: "是否加载 Docker 镜像"
default: "false"
required: false
runs: runs:
using: "composite" using: "composite"
steps: steps:
@ -51,7 +55,10 @@ runs:
context: ${{ inputs.build_context }} context: ${{ inputs.build_context }}
platforms: ${{ inputs.build_platforms }} platforms: ${{ inputs.build_platforms }}
push: ${{ inputs.build_push }} push: ${{ inputs.build_push }}
load: ${{ inputs.build_load }}
# tags: ${{ steps.meta.outputs.tags }} # tags: ${{ steps.meta.outputs.tags }}
# labels: ${{ steps.meta.outputs.labels }} # labels: ${{ steps.meta.outputs.labels }}
cache-from: type=local,src=/tmp/.buildx-cache cache-from: type=gha
cache-to: type=local,dest=/tmp/.buildx-cache cache-to: type=gha,mode=max
# cache-from: type=local,src=/tmp/.buildx-cache
# cache-to: type=local,dest=/tmp/.buildx-cache