Skip to content

Publish Docker Image #1

Publish Docker Image

Publish Docker Image #1

name: Publish Docker image
on:
# Run after we published to https://crates.io
workflow_run:
workflows: [ "Publish Crate" ]
types: [ "completed" ]
env:
PLATFORMS: linux/amd64,linux/arm64
DOCKERHUB_ORG: kafkesc
DOCKERHUB_IMG_NAME: kommitted
RELEASE_VERSION: ${{ github.ref_name }}
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
# Run Publish only if the triggering workflow completed successfully,
# and the workflow ref was a "version tag" of the format "vX.Y.Z"
if: |
github.event.workflow_run.conclusion == 'success'
&&
github.ref_type == 'tag'
# &&
# github.ref_name == 'v[0-9]+.[0-9]+.[0-9]+*'
steps:
- name: Just echo refs
run: echo "ref=${{ github.ref }} ref_name=${{ github.ref_name }} ref_type=${{ github.ref_type }}"
# - name: Login to Docker Hub
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
#
# - name: Set-up Docker Buildx
# uses: docker/setup-buildx-action@v2
# with:
# platforms: ${{ env.PLATFORMS }}
#
# - name: Build & Push
# uses: docker/build-push-action@v4
# with:
# push: true
# platforms: ${{ env.PLATFORMS }}
# build-args: |
# KSUNAMI_VERSION=${{ env.RELEASE_VERSION }}
# tags: |
# ${{ env.DOCKERHUB_ORG }}/${{ env.DOCKERHUB_IMG_NAME }}:latest
# ${{ env.DOCKERHUB_ORG }}/${{ env.DOCKERHUB_IMG_NAME }}:${{ env.RELEASE_VERSION }}