Skip to content

Commit b6b4edf

Browse files
authored
ci: Update build tag to include commit timestamp (#3051)
This modifies the build workflow to append the commit timestamp to the generated tag. It ensures better uniqueness and traceability of snapshot image tags. This can fix parca-dev/demo-deployments#327
2 parents ebb2062 + 5957c67 commit b6b4edf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
id: vars
6363
if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads/')
6464
run: |
65-
echo "tag=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
65+
echo "tag=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}-$(git show -s --format=%ct)-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
6666
echo "git_tag=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
6767
6868
- name: Push snapshot images

0 commit comments

Comments
 (0)