diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index aa931e4..8b3ba62 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -12,11 +12,13 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Set Version + run: export VERSION=$(date +%s) - name: Build the Docker image - run: docker build . --file Dockerfile --tag ghcr.io/raspberryprogramming/tc2-bbs-mesh:$(date +%s) + run: docker build . --file Dockerfile --tag ghcr.io/raspberryprogramming/tc2-bbs-mesh:$VERSION - name: Add latest tag to docker image - run: docker tag ghcr.io/raspberryprogramming/tc2-bbs-mesh:$(date +%s) ghcr.io/raspberryprogramming/tc2-bbs-mesh:latest + run: docker tag ghcr.io/raspberryprogramming/tc2-bbs-mesh:$VERSION ghcr.io/raspberryprogramming/tc2-bbs-mesh:latest - name: Push docker image to ghcr - run: docker push ghcr.io/raspberryprogramming/tc2-bbs-mesh:$(date +%s) + run: docker push ghcr.io/raspberryprogramming/tc2-bbs-mesh:$VERSION - name: Push docker latest image to ghcr run: docker push ghcr.io/raspberryprogramming/tc2-bbs-mesh:latest