strip https in registry
All checks were successful
Build and Publish / build-release (push) Successful in 10m0s
All checks were successful
Build and Publish / build-release (push) Successful in 10m0s
This commit is contained in:
@@ -42,11 +42,15 @@ jobs:
|
|||||||
- name: Tag and Push Docker Image
|
- name: Tag and Push Docker Image
|
||||||
run: |
|
run: |
|
||||||
VERSION=${{ github.run_number }}
|
VERSION=${{ github.run_number }}
|
||||||
TARGET_IMAGE=${{ github.server_url }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}
|
|
||||||
|
# Strip https from server URL
|
||||||
# Auto-detect the built image name
|
REGISTRY=${GITHUB_SERVER_URL#https://}
|
||||||
SOURCE_IMAGE=$(docker images --format "{{.Repository}}:{{.Tag}}" | head -n 1)
|
|
||||||
|
TARGET_IMAGE=$REGISTRY/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}
|
||||||
|
|
||||||
|
# Auto-detect the built image name (better version)
|
||||||
|
SOURCE_IMAGE=$(docker load < result | awk '{print $3}')
|
||||||
|
|
||||||
docker tag $SOURCE_IMAGE $TARGET_IMAGE:$VERSION
|
docker tag $SOURCE_IMAGE $TARGET_IMAGE:$VERSION
|
||||||
docker tag $SOURCE_IMAGE $TARGET_IMAGE:latest
|
docker tag $SOURCE_IMAGE $TARGET_IMAGE:latest
|
||||||
docker push $TARGET_IMAGE:$VERSION
|
docker push $TARGET_IMAGE:$VERSION
|
||||||
|
|||||||
Reference in New Issue
Block a user