Skip to content

Commit b20d736

Browse files
authored
Merge pull request #2 from bison/ghcr
Publish images to ghcr.io instead of docker.pkg.github.com
2 parents a2bac56 + eec10d3 commit b20d736

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/docker-publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ jobs:
4848
run: make build
4949

5050
- name: Build image
51-
run: docker build . --file Dockerfile --tag $IMAGE_NAME
51+
run: docker build . --file Dockerfile --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}"
5252

5353
- name: Log into registry
54-
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
54+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
5555

5656
- name: Push image
5757
run: |
58-
IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME
58+
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
5959
6060
# Change all uppercase to lowercase
6161
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')

0 commit comments

Comments
 (0)