From 074e9f4c74725c6f55f3fdcb051d4443dec9be12 Mon Sep 17 00:00:00 2001 From: Dieter Schmidt Date: Sun, 4 Apr 2021 15:06:33 +0200 Subject: [PATCH] fix #2 WIP --- .github/workflows/klipper_moonraker_multiarch.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/klipper_moonraker_multiarch.yml b/.github/workflows/klipper_moonraker_multiarch.yml index 1ceb0e6..3f02022 100644 --- a/.github/workflows/klipper_moonraker_multiarch.yml +++ b/.github/workflows/klipper_moonraker_multiarch.yml @@ -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