Skip to content

Build and Push One Image #4

Build and Push One Image

Build and Push One Image #4

Workflow file for this run

name: Build and Push One Image
on:
workflow_dispatch:
inputs:
variant:
description: "Image Variant (e.g. latest)"
required: true
default: "latest"
version:
description: "Image Version (e.g. 1.0.0)"
required: true
default: "1.0.0"
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub Registry
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
file: ./src/${{ github.event.inputs.variant }}/Dockerfile
platforms: linux/amd64,linux/arm64
build-args: |
VARIANT=${{ github.event.inputs.variant }}
VERSION=${{ github.event.inputs.version }}
tags: |
${{ vars.DOCKERHUB_USERNAME }}/aio:${{ github.event.inputs.variant }}
${{ vars.DOCKERHUB_USERNAME }}/aio:${{ github.event.inputs.variant }}-${{ github.event.inputs.version }}