Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Commit 8593260

Browse files
authored
Update github container registry (#91)
1 parent ee9ad73 commit 8593260

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/docker-publish.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
branches: [main]
1212
tags: ['v*']
1313
paths: ['src/**', '.github/workflows/**']
14+
env:
15+
IMAGE_NAME: ${{ github.repository }}
16+
REGISTRY: ghcr.io
1417
jobs:
1518
push_to_registry:
1619
name: Push Docker image to GitHub Packages
@@ -27,18 +30,18 @@ jobs:
2730
with:
2831
submodules: true
2932
ref: ${{github.event.inputs.tag || ''}}
30-
- name: Login to GitHub package feed
33+
- name: Login to docker registry
3134
uses: docker/[email protected]
3235
with:
3336
username: ${{ github.actor }}
3437
password: ${{ secrets.GITHUB_TOKEN }}
35-
registry: docker.pkg.github.com
38+
registry: ${{ env.REGISTRY }}
3639
- name: Push to GitHub Packages - Nightly
3740
if: github.ref == 'refs/heads/main' || github.event.inputs.tag == 'main'
3841
uses: docker/[email protected]
3942
with:
4043
push: true
41-
tags: docker.pkg.github.com/microsoftgraph/msgraph-cli/msgraph-cli:nightly
44+
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:nightly
4245
secrets: |
4346
"user=${{ secrets.NUGET_USER }}"
4447
"token=${{ secrets.NUGET_PASSWORD }}"
@@ -47,7 +50,7 @@ jobs:
4750
uses: docker/[email protected]
4851
with:
4952
push: true
50-
tags: docker.pkg.github.com/microsoftgraph/msgraph-cli/msgraph-cli:latest,docker.pkg.github.com/microsoftgraph/msgraph-cli/msgraph-cli:${{ steps.get-version.outputs.version }}
53+
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.get-version.outputs.version }}
5154
secrets: |
5255
"user=${{ secrets.NUGET_USER }}"
5356
"token=${{ secrets.NUGET_PASSWORD }}"

0 commit comments

Comments
 (0)