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