Skip to content

Commit f46fcb4

Browse files
committed
ci: Changing way to tag and promote version
Signed-off-by: Vincent Boutour <[email protected]>
1 parent bb573c5 commit f46fcb4

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.github/workflows/build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ jobs:
100100
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
101101
run: |
102102
curl --disable --silent --show-error --location --max-time 30 "https://raw.githubusercontent.com/ViBiOh/scripts/main/bootstrap" | bash -s -- "-c" "docker_promote"
103-
scripts/docker_promote "${{ secrets.DOCKER_USER }}/$(make name)" "$(make version)"
103+
scripts/docker_promote -d "$(make version-date)" "${{ secrets.DOCKER_USER }}/$(make name)" "$(make version)"
104104
- name: Flux
105105
env:
106106
FLUX_TOKEN: ${{ secrets.FLUX_TOKEN }}

.github/workflows/release.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ jobs:
5151
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
5252
run: |
5353
curl --disable --silent --show-error --location --max-time 30 "https://raw.githubusercontent.com/ViBiOh/scripts/main/bootstrap" | bash -s -- "-c" "docker_promote"
54-
scripts/docker_promote "${{ secrets.DOCKER_USER }}/$(make name)" "$(make version)" "$(basename ${{ github.ref }})"
54+
scripts/docker_promote "${{ secrets.DOCKER_USER }}/$(make name)" "$(make version-date)" "$(basename ${{ github.ref }})"

Makefile

+5
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ name:
3131
version:
3232
@printf "$(shell git rev-parse --short HEAD)"
3333

34+
## version-date: Output last commit date
35+
.PHONY: version-date
36+
version-date:
37+
@printf "$(shell git log -n 1 "--date=format:%Y%m%d%H%M" "--pretty=format:%cd")"
38+
3439
## app: Build whole app
3540
.PHONY: app
3641
app: init dev

0 commit comments

Comments
 (0)