Skip to content

v1.17

v1.17 #23

Workflow file for this run

on:
release:
types: [published]
workflow_dispatch:
inputs:
tag_name:
description: 'Tag name for the image (e.g. v1.0)'
required: true
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set tag name
id: set_tag
run: |
echo "TAG_NAME=${{ github.event.release.tag_name || inputs.tag_name }}" >> $GITHUB_ENV
- 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 Docker image (multi-arch)
run: |
REPO_NAME=$(basename "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')
docker buildx build --platform linux/amd64,linux/arm64 \
-t docker.io/${{ secrets.DOCKERHUB_USERNAME }}/$REPO_NAME:${{ env.TAG_NAME }} \
-t docker.io/${{ secrets.DOCKERHUB_USERNAME }}/$REPO_NAME:latest \
--push .