Add load flag to Github Ci

This commit is contained in:
Aj - Thomas
2022-05-11 10:01:19 +02:00
parent 7b6ecdf3fc
commit 79311b794e

View File

@@ -54,25 +54,5 @@ jobs:
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: false
tags: mhp
- name: Push image
run: |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
# Use Docker `latest` tag convention
[ "$VERSION" == "master" ] && VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:latest
docker push $IMAGE_ID:latest
push: true
tags: [ghcr.io/ajnart/mhp:latest, ghcr.io/ajnart/mhp:${{ github.ref }}]