Skip to content

Commit

Permalink
Add GHCR build and push steps to build.yml and release.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Niladri Halder <[email protected]>
  • Loading branch information
niladrih authored and kmova committed Sep 13, 2021
1 parent d46f7e0 commit 3ee9bcb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ jobs:
images: |
${{ env.IMAGE_ORG }}/device-driver
quay.io/${{ env.IMAGE_ORG }}/device-driver
ghcr.io/${{ env.IMAGE_ORG }}/device-driver
tag-latest: false
tag-custom-only: true
tag-custom: |
Expand Down Expand Up @@ -184,6 +185,13 @@ jobs:
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}

- name: Login to GHCR
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build & Push Image
uses: docker/build-push-action@v2
with:
Expand All @@ -197,4 +205,4 @@ jobs:
DBUILD_DATE=${{ steps.date.outputs.DATE }}
DBUILD_REPO_URL=https://github.com/openebs/device-localpv
DBUILD_SITE_URL=https://openebs.io
BRANCH=${{ env.BRANCH }}
BRANCH=${{ env.BRANCH }}
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
images: |
${{ env.IMAGE_ORG }}/device-driver
quay.io/${{ env.IMAGE_ORG }}/device-driver
ghcr.io/${{ env.IMAGE_ORG }}/device-driver
tag-latest: true
tag-semver: |
{{version}}
Expand Down Expand Up @@ -85,6 +86,13 @@ jobs:
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}

- name: Login to GHCR
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build & Push Image
uses: docker/build-push-action@v2
with:
Expand Down

0 comments on commit 3ee9bcb

Please sign in to comment.