-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
90fdf7b
commit 62d5306
Showing
2 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
description: Pulls image digests from GitHub and pushes manifests to GAR | ||
inputs: | ||
full-image-name: | ||
description: Image name to push the manifest for | ||
required: true | ||
tag: | ||
description: Tag to create and push the manifest for | ||
required: true | ||
name: Create and push image manifest | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | ||
- name: Download digests | ||
uses: actions/download-artifact@v4 | ||
with: | ||
merge-multiple: true | ||
path: /tmp/digests | ||
pattern: digests-*-${{ inputs.tag }} | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- id: meta | ||
name: Docker meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ inputs.full-image-name }} | ||
tags: ${{ inputs.tag }} | ||
- id: login-to-gar | ||
uses: grafana/shared-workflows/actions/login-to-gar@main | ||
- 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 '${{ inputs.full-image-name }}@sha256:%s ' *)" | ||
- name: Inspect image | ||
shell: bash | ||
run: | | ||
"docker buildx imagetools inspect ${{ inputs.full-image-name }}:${{ steps.meta.outputs.version }}" | ||