Skip to content

Commit 4f43946

Browse files
authored
Update pipelines (#74)
1 parent 5ee981c commit 4f43946

2 files changed

Lines changed: 26 additions & 11 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
branches: [ main ]
88

99
env:
10-
REGISTRY: ghcr.io
1110
IMAGE_NAME: ${{ github.repository }}
1211

1312
jobs:
@@ -21,8 +20,10 @@ jobs:
2120
id: meta
2221
uses: docker/metadata-action@v5
2322
with:
24-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
25-
- name: Build and push Docker image
23+
images: |
24+
${{ secrets.DOCKER_ORGANIZATION }}/${{ env.IMAGE_NAME }}
25+
${{ vars.REGISTRY_GITHUB }}/${{ env.IMAGE_NAME }}
26+
- name: Build image
2627
uses: docker/build-push-action@v6
2728
with:
2829
context: .

.github/workflows/publish.yml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,31 @@ on:
55
types: [published]
66

77
env:
8-
REGISTRY: ghcr.io
98
IMAGE_NAME: ${{ github.repository }}
109

1110
jobs:
1211
push_to_registry:
13-
name: Push image to GitHub container registry
14-
12+
name: Push image to registries
1513
runs-on: ubuntu-latest
1614
permissions:
1715
contents: read
1816
packages: write
1917

2018
steps:
2119
- name: Checkout repository
22-
uses: actions/checkout@v6
20+
uses: actions/checkout@v5
21+
22+
- name: Log in to Docker Hub
23+
uses: docker/login-action@v3
24+
with:
25+
registry: ${{ vars.DOCKER_REGISTRY }}
26+
username: ${{ secrets.DOCKER_USERNAME }}
27+
password: ${{ secrets.DOCKER_TOKEN }}
2328

24-
- name: Login to the container registry
29+
- name: Login to GitHub registry
2530
uses: docker/login-action@v3
2631
with:
27-
registry: ${{ env.REGISTRY }}
32+
registry: ${{ vars.REGISTRY_GITHUB }}
2833
username: ${{ github.actor }}
2934
password: ${{ secrets.GITHUB_TOKEN }}
3035

@@ -38,13 +43,22 @@ jobs:
3843
id: meta
3944
uses: docker/metadata-action@v5
4045
with:
41-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
46+
images: |
47+
${{ secrets.DOCKER_ORGANIZATION }}/${{ env.IMAGE_NAME }}
48+
${{ vars.REGISTRY_GITHUB }}/${{ env.IMAGE_NAME }}
4249
43-
- name: Build and push Docker image
50+
- name: Build and push image
4451
uses: docker/build-push-action@v6
4552
with:
4653
context: .
4754
push: true
4855
tags: ${{ steps.meta.outputs.tags }}
4956
labels: ${{ steps.meta.outputs.labels }}
5057
platforms: linux/amd64, linux/arm64
58+
59+
- name: Update DockerHub repository description
60+
uses: peter-evans/dockerhub-description@v5
61+
with:
62+
repository: ${{ secrets.DOCKER_ORGANIZATION }}/${{ env.IMAGE_NAME }}
63+
username: ${{ secrets.DOCKER_USERNAME }}
64+
password: ${{ secrets.DOCKER_TOKEN }}

0 commit comments

Comments
 (0)