Skip to content

Commit

Permalink
Update multi-build.yaml
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolás Georger <info@sredevops.cl>
  • Loading branch information
ngeorger authored May 14, 2024
1 parent 4491658 commit 0907d31
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions .github/workflows/multi-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ on:
inputs:
manual-tag:
description: 'Manual Tag'
required: false
required: true
default: 'manual'
type: string
ghost_version:
description: 'Ghost version'
required: false
required: true
default: '5.82.9'
type: string
workflow_call:
Expand Down Expand Up @@ -96,8 +96,6 @@ jobs:
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
with:
images: ${{ env.GHCR_IMAGE }}
labels: |
org.opencontainers.image.description=${{ github.event.repository.description }}
annotations: |
org.opencontainers.image.description=${{ github.event.repository.description }}
Expand Down Expand Up @@ -201,13 +199,16 @@ jobs:
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index
with:
images: ${{ env.GHCR_IMAGE }}
annotations: ${{ github.job.build.steps.meta.outputs.annotations || github.job.build.steps.meta.outputs.json.annotations }}
labels: ${{ github.job.build.steps.meta.outputs.labels || github.job.build.steps.meta.outputs.json.labels }}
annotations: |
type=org.opencontainers.image.description,value=${{ github.event.repository.description }}
type=org.opencontainers.image.url,value=${{ github.event.repository.html_url }}
type=org.opencontainers.image.source,value=${{ github.event.repository.clone_url }}
type=org.opencontainers.image.vendor,value=${{ github.event.organization.login }}
tags: |
type=raw,value=main,enable={{is_default_branch}}
type=raw,value=latest,enable=${{ github.event_name == 'release' }}
type=raw,value=${{ github.env.MANUAL_TAG }},enable=${{ github.event_name == 'workflow_dispatch' }}
type=raw,value=v${{ github.job.build.steps.versions.outputs.GHOST_VERSION }},enable=${{ github.event_name == 'workflow_dispatch' }}
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=${{ github.event.inputs.manual-tag }},enable=${{ github.event_name == 'workflow_dispatch' }}
-
name: Login to GitHub Container Registry
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
Expand All @@ -220,10 +221,11 @@ jobs:
working-directory: /tmp/digests
id: manifest
run: |
docker buildx imagetools create \
$(jq -cr '.tags | map("--tag " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(jq -cr '.annotations | map("--annotation " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ env.GHCR_IMAGE }}@sha256:%s ' *)
docker buildx imagetools create \
--annotation org.opencontainers.image.description="${{ github.event.repository.description }}" \
$(jq -cr '.tags | map("--tag " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ env.GHCR_IMAGE }}@sha256:%s ' *)
# $(jq -cr '.annotations | map("--annotation " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
-
name: Inspect image
id: inspect
Expand Down

0 comments on commit 0907d31

Please sign in to comment.