Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
branches: [ main ]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
Expand All @@ -21,8 +20,10 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
images: |
${{ secrets.DOCKER_ORGANIZATION }}/${{ env.IMAGE_NAME }}
${{ vars.REGISTRY_GITHUB }}/${{ env.IMAGE_NAME }}
- name: Build image
uses: docker/build-push-action@v6
with:
context: .
Expand Down
30 changes: 22 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,31 @@ on:
types: [published]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
push_to_registry:
name: Push image to GitHub container registry

name: Push image to registries
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@v5

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
registry: ${{ vars.DOCKER_REGISTRY }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Login to the container registry
- name: Login to GitHub registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
registry: ${{ vars.REGISTRY_GITHUB }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -38,13 +43,22 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: |
${{ secrets.DOCKER_ORGANIZATION }}/${{ env.IMAGE_NAME }}
${{ vars.REGISTRY_GITHUB }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
- name: Build and push image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64, linux/arm64

- name: Update DockerHub repository description
uses: peter-evans/dockerhub-description@v5
with:
repository: ${{ secrets.DOCKER_ORGANIZATION }}/${{ env.IMAGE_NAME }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}