Skip to content

Commit 2df21b0

Browse files
niladrihKiran Mova
authored andcommitted
Add GHCR login as a part of Build and Release
Signed-off-by: Niladri Halder <[email protected]>
1 parent ee72ee6 commit 2df21b0

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ jobs:
9898
images: |
9999
${{ env.IMAGE_ORG }}/provisioner-localpv
100100
quay.io/${{ env.IMAGE_ORG }}/provisioner-localpv
101+
ghcr.io/${{ env.IMAGE_ORG }}/provisioner-localpv
101102
tag-latest: false
102103
tag-custom-only: true
103104
tag-custom: |
@@ -131,6 +132,13 @@ jobs:
131132
username: ${{ secrets.QUAY_USERNAME }}
132133
password: ${{ secrets.QUAY_TOKEN }}
133134

135+
- name: Login to GHCR
136+
uses: docker/login-action@v1
137+
with:
138+
registry: ghcr.io
139+
username: ${{ github.actor }}
140+
password: ${{ secrets.GITHUB_TOKEN }}
141+
134142
- name: Checkout
135143
uses: actions/checkout@v2
136144

.github/workflows/release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
images: |
5252
${{ env.IMAGE_ORG }}/provisioner-localpv
5353
quay.io/${{ env.IMAGE_ORG }}/provisioner-localpv
54+
ghcr.io/${{ env.IMAGE_ORG }}/provisioner-localpv
5455
tag-latest: true
5556
tag-semver: |
5657
{{version}}
@@ -84,6 +85,13 @@ jobs:
8485
username: ${{ secrets.QUAY_USERNAME }}
8586
password: ${{ secrets.QUAY_TOKEN }}
8687

88+
- name: Login to GHCR
89+
uses: docker/login-action@v1
90+
with:
91+
registry: ghcr.io
92+
username: ${{ github.actor }}
93+
password: ${{ secrets.GITHUB_TOKEN }}
94+
8795
- name: Build and Push Image
8896
uses: docker/build-push-action@v2
8997
with:

0 commit comments

Comments
 (0)