mirror of
https://github.com/netfun2000/hipudding-teslamate.git
synced 2026-02-27 09:44:28 +08:00
47 lines
1.4 KiB
YAML
47 lines
1.4 KiB
YAML
name: "Merge"
|
|
description: "Merge images"
|
|
inputs:
|
|
tags:
|
|
description: "Tags"
|
|
required: false
|
|
default: ""
|
|
image:
|
|
description: "Image target"
|
|
required: true
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Merge digests and reupload
|
|
uses: actions/upload-artifact/merge@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
|
|
with:
|
|
name: digests
|
|
pattern: single-digest-*
|
|
|
|
- name: Download merged digests
|
|
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
|
|
with:
|
|
name: digests
|
|
path: /tmp/digests
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@4fd812986e6c8c2a69e18311145f9371337f27d4 # v3.4.0
|
|
|
|
- name: Docker meta
|
|
id: meta
|
|
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
|
|
with:
|
|
images: ${{ inputs.image }}
|
|
tags: ${{ inputs.tags }}
|
|
|
|
- name: Create manifest list and push
|
|
working-directory: /tmp/digests
|
|
shell: bash
|
|
run: |
|
|
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
|
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
|
|
- name: Inspect image
|
|
shell: bash
|
|
run: |
|
|
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}
|