Skip to content

Commit 972a423

Browse files
authored
Update docker-publish.yml
1 parent a5cab3d commit 972a423

1 file changed

Lines changed: 17 additions & 17 deletions

File tree

.github/workflows/docker-publish.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -50,27 +50,27 @@ jobs:
5050
- name: Build image
5151
run: docker build . --file Dockerfile --tag $IMAGE_NAME
5252

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

56-
# - name: Push image
57-
# run: |
58-
# IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME
56+
- name: Push image
57+
run: |
58+
IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME
5959
60-
# # Change all uppercase to lowercase
61-
# IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
60+
# Change all uppercase to lowercase
61+
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
6262
63-
# # Strip git ref prefix from version
64-
# VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
63+
# Strip git ref prefix from version
64+
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
6565
66-
# # Strip "v" prefix from tag name
67-
# [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
66+
# Strip "v" prefix from tag name
67+
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
6868
69-
# # Use Docker `latest` tag convention
70-
# [ "$VERSION" == "master" ] && VERSION=latest
69+
# Use Docker `latest` tag convention
70+
[ "$VERSION" == "master" ] && VERSION=latest
7171
72-
# echo IMAGE_ID=$IMAGE_ID
73-
# echo VERSION=$VERSION
72+
echo IMAGE_ID=$IMAGE_ID
73+
echo VERSION=$VERSION
7474
75-
# docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
76-
# docker push $IMAGE_ID:$VERSION
75+
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
76+
docker push $IMAGE_ID:$VERSION

0 commit comments

Comments
 (0)