chore: workflow testing
This commit is contained in:
parent
6d5540bf77
commit
ec809d829a
1 changed files with 7 additions and 6 deletions
13
.github/workflows/docker-multiplatform.yml
vendored
13
.github/workflows/docker-multiplatform.yml
vendored
|
@ -19,12 +19,13 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
DOCKER_IMAGE=${{ secrets.DOCKER_USERNAME }}/${GITHUB_REPOSITORY#*/}
|
DOCKER_IMAGE=${{ secrets.DOCKER_USERNAME }}/${GITHUB_REPOSITORY#*/}
|
||||||
VERSION=latest
|
VERSION=latest
|
||||||
SHORTREF=$(git rev-parse --short=8 ${{ inputs.tag }})
|
SHORTREF=${GITHUB_SHA::8}
|
||||||
|
# If this is git tag, use the tag name as a docker tag
|
||||||
VERSION=${{ inputs.tag }}
|
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
||||||
VERSION="${VERSION//v}"
|
VERSION=${GITHUB_REF#refs/tags/v}
|
||||||
|
fi
|
||||||
|
|
||||||
TAGS="${DOCKER_IMAGE}:${VERSION},${DOCKER_IMAGE}:${SHORTREF}"
|
TAGS="${DOCKER_IMAGE}:${VERSION},${DOCKER_IMAGE}:${SHORTREF}"
|
||||||
|
|
||||||
# If the VERSION looks like a version number, assume that
|
# If the VERSION looks like a version number, assume that
|
||||||
# this is the most recent version of the image and also
|
# this is the most recent version of the image and also
|
||||||
# tag it 'latest'.
|
# tag it 'latest'.
|
||||||
|
@ -32,7 +33,7 @@ jobs:
|
||||||
TAGS="$TAGS,${DOCKER_IMAGE}:latest"
|
TAGS="$TAGS,${DOCKER_IMAGE}:latest"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Set output parameters.
|
# Set output parameters.
|
||||||
echo ::set-output name=tags::${TAGS}
|
echo ::set-output name=tags::${TAGS}
|
||||||
echo ::set-output name=docker_image::${DOCKER_IMAGE}
|
echo ::set-output name=docker_image::${DOCKER_IMAGE}
|
||||||
|
|
Loading…
Reference in a new issue