Skip to content

Publish Docker Image #3

Publish Docker Image

Publish Docker Image #3

name: Publish Docker Image
on:
# Enable the occasional manual trigger
workflow_dispatch:
# This workflow is designed to be invoked by others, not triggered by events.
workflow_call:
inputs:
target-platforms:
type: string
default: linux/amd64,linux/arm64
description: Platforms to target when publishing the docker image
dockerhub-org:
type: string
default: kafkesc
description: Docker Hub organization under which to publish the docker image
dockerhub-imagename:
type: string
default: kommitted
description: Name of the docker image to publish
release-version:
required: true
type: string
description: Version to publish as docker image (eg. 'vX.Y.Z')
secrets:
dockerhub-username:
required: true
description: Docker Hub username to use when publishing the image
dockerhub-password:
required: true
description: Docker Hub password to use when publishing the image (e.g. the API token)
jobs:
build-and-push:
name: Build&Push ${{ inputs.dockerhub-org }}/${{ inputs.dockerhub-imagename }}:${{ inputs.release-version }} (${{ inputs.target-platforms })

Check failure on line 43 in .github/workflows/hub.docker.com-publish.yml

View workflow run for this annotation

GitHub Actions / Publish Docker Image

Invalid workflow file

The workflow is not valid. .github/workflows/hub.docker.com-publish.yml (Line: 43, Col: 11): The expression is not closed. An unescaped ${{ sequence was found, but the closing }} sequence was not found.
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set-up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.dockerhub-username }}
password: ${{ secrets.dockerhub-password }}
- name: Build + Push
uses: docker/build-push-action@v5
with:
push: true
platforms: ${{ inputs.target-platforms }}
build-args: |
KOMMITTED_VERSION=${{ inputs.release-version }}
tags: |
${{ inputs.dockerhub-org }}/${{ inputs.dockerhub-imagename }}:latest
${{ inputs.dockerhub-org }}/${{ inputs.dockerhub-imagename }}:${{ inputs.release-version }}