From 27aaf6e584514589d58a5690f8db96d882f918ff Mon Sep 17 00:00:00 2001 From: jamesread Date: Mon, 9 Sep 2024 22:30:25 +0100 Subject: [PATCH] ci: Add timestamp to container as primitive version --- .github/workflows/build-containers.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index 4d089a88c..119bda5ee 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -1,5 +1,5 @@ --- -name: "Build Tag" +name: "Build Containers" on: push: @@ -25,10 +25,14 @@ jobs: - name: docker build run: /var/run/docker-build.sh + - name: Get date + run: | + echo "DATE=$(date +'%s')" >> "$GITHUB_ENV" + - name: docker tag run: | - docker tag localhost/postiz ghcr.io/githubhq/postiz-app:${{ GITHUB_REF_NAME }} - docker push ghcr.io/githubhq/postiz-app:${{ GITHUB_REF_NAME }} + docker tag localhost/postiz ghcr.io/githubhq/postiz-app:${{ env.DATE }} + docker push ghcr.io/githubhq/postiz-app:${{ env.DATE }} - docker tag localhost/postiz-devcontainer ghcr.io/githubhq/postiz-app:${{ GITHUB_REF_NAME }} - docker push ghcr.io/githubhq/postiz-devcontainer:${{ GITHUB_REF_NAME }} + docker tag localhost/postiz-devcontainer ghcr.io/githubhq/postiz-app:${{ env.DATE }} + docker push ghcr.io/githubhq/postiz-devcontainer:${{ env.DATE }}