Skip to content

Commit 75d8a04

Browse files
authored
Update dockercontainer-build.yml
1 parent 8edb413 commit 75d8a04

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/dockercontainer-build.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
else
2828
docker build . --file Dockerfile
2929
fi
30-
# Push multi-architecture image to GitHub Packages.
30+
# Push multi-architecture image to GitHub Container Registry.
3131
push:
3232
# Ensure test job passes before pushing image.
3333
needs: test
@@ -46,13 +46,17 @@ jobs:
4646
- name: Set up Docker Buildx
4747
uses: docker/setup-buildx-action@v1
4848

49-
- name: Log into registry
50-
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
49+
- name: Login to GitHub Container Registry
50+
uses: docker/login-action@v1
51+
with:
52+
registry: ghcr.io
53+
username: ${{ github.actor }}
54+
password: ${{ secrets.GITHUB_TOKEN }}
5155

5256
- name: Prepare image metadata
5357
id: prep
5458
run: |
55-
IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME
59+
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
5660
5761
# Change all uppercase to lowercase
5862
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')

0 commit comments

Comments
 (0)