This commit is contained in:
Dieter Schmidt
2021-04-04 15:06:33 +02:00
parent a74cf7fc56
commit 074e9f4c74

View File

@@ -13,19 +13,23 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Prepare
id: prep
run: |
DOCKER_IMAGE=${{ secrets.DOCKER_USERNAME }}/klipper-moonraker
VERSION=latest
SHORTREF=${GITHUB_SHA::8}
DATE=${{steps.date.outputs.date}}
# If this is git tag, use the tag name as a docker tag
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/v}
fi
TAGS="${DOCKER_IMAGE}:${VERSION},${DOCKER_IMAGE}:${SHORTREF}"
TAGS="${DOCKER_IMAGE}:${VERSION},${DOCKER_IMAGE}:${DATE}"
# If the VERSION looks like a version number, assume that
# this is the most recent version of the image and also