Merge pull request #1976 from kalsi-avneet/topic/push-to-dockerhub

Docker publish workflow: Login and push to dockerhub as well
This commit is contained in:
Peter Bieringer
2026-01-28 11:32:22 +01:00
committed by GitHub

View File

@@ -8,7 +8,7 @@ on:
workflow_dispatch:
env:
REGISTRY: ghcr.io
GHCR_REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
@@ -22,18 +22,26 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
- name: Log in to the ghcr container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
registry: ${{ env.GHCR_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Log in to the dockerhub container registry
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_ORGNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata for Docker build
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: |
name=${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}
name=${{ env.IMAGE_NAME }}
flavor: latest=true
tags: |
type=semver,pattern={{version}}