Skip to content

🐳 Publish image

🐳 Publish image #2

Workflow file for this run

# Copyright 2026 Katteli Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Builds testflows/machine-examples and pushes it to Docker Hub as
# :<YYYYMMDD-HHMM> and :latest. Run by hand: a new image is a release.
name: 🐳 Publish image
on:
workflow_dispatch:
permissions:
contents: read
env:
IMAGE: testflows/machine-examples
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Version
id: version
run: echo "version=$(date -u +%Y%m%d-%H%M)" >> "$GITHUB_OUTPUT"
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64
build-args: VERSION=${{ steps.version.outputs.version }}
push: true
tags: |
${{ env.IMAGE }}:${{ steps.version.outputs.version }}
${{ env.IMAGE }}:latest
- name: Check the pushed image
run: |
docker run --rm --platform linux/amd64 "$IMAGE:${{ steps.version.outputs.version }}" | grep -q "Hello from TestFlows™ Machine"
echo "### Published $IMAGE:${{ steps.version.outputs.version }} and :latest" >> "$GITHUB_STEP_SUMMARY"