Include git based version
All checks were successful
Build and deploy / Build container and manifests (push) Successful in 6m29s

This commit is contained in:
2025-04-18 15:20:36 +02:00
parent d602220c4b
commit e9fe169a9a
9 changed files with 51 additions and 11 deletions

View File

@@ -17,17 +17,13 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
# TODO: Actually set an env variable and use it in the application
- name: Set version string
- name: Set timestamp and release version
run: |
git describe --always --dirty="-modified"
- name: Get Git commit timestamps
run: echo "TIMESTAMP=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV
echo "TIMESTAMP=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV
git fetch --prune --unshallow --tags --force
echo "RELEASE_VERSION=$(git describe --always --dirty='--modified')" >> $GITHUB_ENV
cat $GITHUB_ENV
- name: Login to registry
uses: docker/login-action@v3
@@ -72,6 +68,8 @@ jobs:
annotations: ${{ steps.meta.outputs.annotations }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
"RELEASE_VERSION=${{ env.RELEASE_VERSION }}"
env:
SOURCE_DATE_EPOCH: ${{ env.TIMESTAMP }}