From 3bd50719217b5a8eba6120a2bad5cd87a7a6ce18 Mon Sep 17 00:00:00 2001 From: Leonard Ehrenfried Date: Wed, 21 Feb 2024 16:54:05 +0100 Subject: [PATCH] Use date-based tag rather than git SHA --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c3e600e..523da39b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -246,10 +246,14 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Set container date tag + run: | + echo "DATE_TAG=$(date +%Y-%m-%dT%H-%M)" >> $GITHUB_ENV + - name: Build and push production docker image to Dockerhub if: ${{ github.ref == 'refs/heads/master' && github.repository_owner == 'mediagis' }} run: |- docker buildx build --platform linux/amd64,linux/arm64 --push \ -t mediagis/nominatim:${{ matrix.nominatim.version }} \ - -t mediagis/nominatim:${{ matrix.nominatim.version }}-${{ github.sha }} . + -t mediagis/nominatim:${{ matrix.nominatim.version }}-${DATE_TAG} . working-directory: ${{ matrix.nominatim.version }}