59 lines
1.6 KiB
YAML
59 lines
1.6 KiB
YAML
name: Push linux docker multi-arch image to registry
|
|
|
|
inputs:
|
|
docker-image-name:
|
|
required: true
|
|
type: string
|
|
docker-username:
|
|
required: true
|
|
type: string
|
|
docker-password:
|
|
required: true
|
|
type: string
|
|
docker-bake-meta-file-path:
|
|
required: true
|
|
type: string
|
|
docker-bake-meta-artifact-name:
|
|
required: true
|
|
type: string
|
|
docker-bake-digests-file-path:
|
|
required: true
|
|
type: string
|
|
docker-bake-digests-artifact-name-prefix:
|
|
required: true
|
|
type: string
|
|
docker-image-tags:
|
|
required: true
|
|
type: string
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Download docker bake meta artifact
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: ${{ inputs.docker-bake-meta-artifact-name }}
|
|
path: ${{ runner.temp }}
|
|
|
|
- name: Download digests artifact
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
pattern: ${{ inputs.docker-bake-digests-artifact-name-prefix }}-*
|
|
merge-multiple: true
|
|
path: ${{ inputs.docker-bake-digests-file-path }}
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ inputs.docker-username }}
|
|
password: ${{ inputs.docker-password }}
|
|
|
|
- name: Create manifest and push
|
|
shell: bash
|
|
working-directory: ${{ inputs.docker-bake-digests-file-path }}
|
|
run: |
|
|
docker buildx imagetools create $(echo "${{ inputs.docker-image-tags }}" | xargs -I {} echo -n " -t {}") $(printf '${{ inputs.docker-image-name }}@sha256:%s ' *)
|