fix: use --load --output=type=docker for local builds so images are available to run
This commit is contained in:
@@ -108,7 +108,6 @@ runs:
|
||||
env:
|
||||
DOCKER_BUILDKIT: "1"
|
||||
run: |
|
||||
set -x
|
||||
CACHE_FROM_FLAG=""
|
||||
if [ -n "${{ inputs.cache-from }}" ]; then
|
||||
CACHE_FROM_FLAG="--cache-from=${{ inputs.cache-from }}"
|
||||
@@ -126,11 +125,14 @@ runs:
|
||||
PLATFORM_FLAG="--platform=${{ inputs.platforms }}"
|
||||
fi
|
||||
|
||||
PUSH_FLAG=""
|
||||
# Choose output mode
|
||||
if [ "${{ inputs.push }}" = "true" ]; then
|
||||
PUSH_FLAG="--push"
|
||||
OUTPUT_FLAG="--push --output=type=registry"
|
||||
else
|
||||
OUTPUT_FLAG="--load --output=type=docker"
|
||||
fi
|
||||
|
||||
set -x
|
||||
docker buildx build \
|
||||
$PLATFORM_FLAG \
|
||||
--tag "${{ inputs.image-name }}:${{ steps.meta.outputs.tag }}" \
|
||||
@@ -141,7 +143,7 @@ runs:
|
||||
$CACHE_FROM_FLAG \
|
||||
$BUILD_ARGS_FLAG \
|
||||
--progress=plain \
|
||||
$PUSH_FLAG \
|
||||
$OUTPUT_FLAG \
|
||||
${{ inputs.context }}
|
||||
|
||||
- name: Get image digest
|
||||
|
||||
Reference in New Issue
Block a user