Skip to content

Workflow file for this run

---
name: Build and Publish (Docker)
on:
release:
types:
- published
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set Repository
run: |
docker_repository=$(echo "${{ github.event.repository.name }}" | tr '[:upper:]' '[:lower:]')
echo "DOCKER_REPOSITORY=${{ secrets.DOCKER_USERNAME }}/${docker_repository}" >> $GITHUB_ENV
shell: bash
- 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.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: |
${{ env.DOCKER_REPOSITORY }}:${{ github.event.release.tag_name }},${{ env.DOCKER_REPOSITORY }}:latest