Skip to content

Commit dc8e30e

Browse files
niladrihKiran Mova
authored andcommitted
Add GHCR image push workflow
Signed-off-by: Niladri Halder <[email protected]>
1 parent 5e8ba9a commit dc8e30e

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
@@ -105,6 +105,7 @@ jobs:
105105
images: |
106106
${{ env.IMAGE_ORG }}/m-exporter
107107
quay.io/${{ env.IMAGE_ORG }}/m-exporter
108+
ghcr.io/${{ env.IMAGE_ORG }}/m-exporter
108109
tag-latest: false
109110
tag-custom-only: true
110111
tag-custom: |
@@ -139,6 +140,13 @@ jobs:
139140
username: ${{ secrets.QUAY_USERNAME }}
140141
password: ${{ secrets.QUAY_TOKEN }}
141142

143+
- name: Login to GHCR
144+
uses: docker/login-action@v1
145+
with:
146+
registry: ghcr.io
147+
username: ${{ github.actor }}
148+
password: ${{ secrets.GITHUB_TOKEN }}
149+
142150
- name: Build & Push Image
143151
uses: docker/build-push-action@v2
144152
with:

.github/workflows/release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ jobs:
5252
images: |
5353
${{ env.IMAGE_ORG }}/m-exporter
5454
quay.io/${{ env.IMAGE_ORG }}/m-exporter
55+
ghcr.io/${{ env.IMAGE_ORG }}/m-exporter
5556
tag-latest: true
5657
tag-semver: |
5758
{{version}}
@@ -85,6 +86,13 @@ jobs:
8586
username: ${{ secrets.QUAY_USERNAME }}
8687
password: ${{ secrets.QUAY_TOKEN }}
8788

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

0 commit comments

Comments
 (0)