Refactor Docker image versioning in workflow

This commit is contained in:
Camerin Figueroa 2025-11-15 19:36:44 -05:00 committed by GitHub
parent 3985742703
commit adbed87305
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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