Skip to content

Commit 3e71125

Browse files
committed
push to ghcr
1 parent 7f94988 commit 3e71125

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/mpi-operator-docker-image-publish.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212

1313
env:
1414
IMAGE_NAME: mpioperator/mpi-operator
15+
GHCR_IMAGE_NAME: ghcr.io/mpioperator/mpi-operator
1516

1617
jobs:
1718
build-push-docker-image:
@@ -26,6 +27,7 @@ jobs:
2627
with:
2728
images: |
2829
${{ env.IMAGE_NAME }}
30+
${{ env.GHCR_IMAGE_NAME }}
2931
tags: |
3032
type=ref,event=branch
3133
type=ref,event=pr
@@ -39,6 +41,14 @@ jobs:
3941
username: ${{ secrets.DOCKERHUB_USERNAME }}
4042
password: ${{ secrets.DOCKERHUB_TOKEN }}
4143

44+
- name: Login to GitHub Container Registry
45+
if: github.event_name != 'pull_request'
46+
uses: docker/login-action@v2
47+
with:
48+
registry: ghcr.io
49+
username: ${{ github.actor }}
50+
password: ${{ secrets.GITHUB_TOKEN }}
51+
4252
- name: Docker Setup QEMU
4353
uses: docker/[email protected]
4454

0 commit comments

Comments
 (0)