Skip to content

Commit 2e455b7

Browse files
committed
Merge branch 'main' of github.com:jrnd-io/jr
2 parents 5aae3a2 + 9549f76 commit 2e455b7

File tree

1 file changed

+32
-2
lines changed

1 file changed

+32
-2
lines changed

.github/workflows/publish.yml

+32-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ on:
99
env:
1010
REGISTRY: ghcr.io
1111
IMAGE_NAME: "jr"
12+
DOCKER-HUB-NAMESPACE: "jrndio"
1213

1314
jobs:
14-
docker-build:
15+
docker-build-ghcr:
1516
runs-on: ubuntu-latest
1617

1718
permissions:
@@ -39,4 +40,33 @@ jobs:
3940
context: .
4041
push: true
4142
platforms: linux/amd64,linux/arm64
42-
tags: ghcr.io/${{ github.repository_owner }}/jr:${{ github.ref_name }}
43+
tags: ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
44+
45+
docker-build-dockerhub:
46+
runs-on: ubuntu-latest
47+
48+
permissions:
49+
contents: read
50+
packages: write
51+
52+
steps:
53+
- name: Checkout
54+
uses: actions/checkout@v4
55+
- name: Set up QEMU
56+
uses: docker/setup-qemu-action@v3
57+
- name: Set up Docker Buildx
58+
uses: docker/setup-buildx-action@v3
59+
- name: Checkout repository
60+
uses: actions/checkout@v4
61+
- name: Log in to the Container registry
62+
uses: docker/login-action@v3
63+
with:
64+
username: ${{ secrets.DOCKERHUB_USERNAME }}
65+
password: ${{ secrets.DOCKERHUB_TOKEN }}
66+
- name: Build and push docker image to ghcr.io
67+
uses: docker/build-push-action@v5
68+
with:
69+
context: .
70+
push: true
71+
platforms: linux/amd64,linux/arm64
72+
tags: ${{ env.DOCKER-HUB-NAMESPACE}}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}

0 commit comments

Comments
 (0)