Skip to content

Commit a840aa5

Browse files
Update docker-publish.yml
1 parent 7153fe5 commit a840aa5

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

.github/workflows/docker-publish.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,23 +52,17 @@ jobs:
5252

5353
- name: Log into GitHub Container Registry
5454
# TODO: Create a PAT with `read:packages` and `write:packages` scopes and save it as an Actions secret `CR_PAT`
55-
run: echo "${{ secrets.CR_PAT }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin
55+
run: echo "${{ secrets.CR_PAT }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
5656

5757
- name: Push image to GitHub Container Registry
5858
run: |
59-
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
59+
IMAGE_ID=docker.pkg.github.com/${{ github.repository_owner }}/kustomize/$IMAGE_NAME
6060
6161
# Change all uppercase to lowercase
6262
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
6363
6464
# Strip git ref prefix from version
65-
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
66-
67-
# Strip "v" prefix from tag name
68-
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
69-
70-
# Use Docker `latest` tag convention
71-
[ "$VERSION" == "master" ] && VERSION=latest
65+
VERSION=${{ github.ref }}
7266
7367
echo IMAGE_ID=$IMAGE_ID
7468
echo VERSION=$VERSION

0 commit comments

Comments
 (0)