Skip to content

Release Container Image #9

Release Container Image

Release Container Image #9

name: Release Container Image
on:
workflow_dispatch:
release:
types: [released]
jobs:
release-container-image:
strategy:
matrix:
containers:
- file: Dockerfile
tags: |
simonkowallik/tmconfpy:latest
ghcr.io/simonkowallik/tmconfpy:latest
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- 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.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64
file: ${{ matrix.containers.file }}
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ matrix.containers.tags }}
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v4
with:
# docker... https://github.com/peter-evans/dockerhub-description/issues/10
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: ${{ github.repository }}
short-description: ${{ github.event.repository.description }}