We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aa0d40b commit 9ac29daCopy full SHA for 9ac29da
1 file changed
.github/workflows/build-ssp.container.yaml
@@ -21,6 +21,17 @@ jobs:
21
- name: Set up Docker Buildx
22
uses: docker/setup-buildx-action@v3
23
24
+ - name: Create version tag
25
+ id: version
26
+ run: |
27
+ # Get the tag that triggered the workflow if it exists
28
+ # If no tag exists, use the commit hash as the version
29
+ if [ -n "${GITHUB_TAG}" ]; then
30
+ echo "version=${GITHUB_TAG}" >> $GITHUB_OUTPUT
31
+ else
32
+ echo "version=${GITHUB_SHA}" >> $GITHUB_OUTPUT
33
+ fi
34
+
35
- name: Login to GitHub Container Registry
36
uses: docker/login-action@v3
37
with:
@@ -37,3 +48,5 @@ jobs:
48
tags: |
38
49
ghcr.io/openconext/openconext-devssp/devssp:latest
39
50
ghcr.io/openconext/openconext-devssp/devssp:${{ github.sha }}
51
+ org.opencontainers.image.created: ${{ events.created_at }}
52
+ org.opencontainers.image.version: ${{ version.version }}
0 commit comments