Update image tag in deployment and modify build workflow for tag handling
All checks were successful
Build k8s-mgmt-pod image / Build & Push (push) Successful in 28s

This commit is contained in:
Michael Trip 2026-06-23 15:13:46 +02:00
parent 4dbcde381f
commit 91cb88097f
2 changed files with 6 additions and 3 deletions

View file

@ -71,7 +71,11 @@ jobs:
DATE="${{ steps.meta.outputs.build_date_short }}" DATE="${{ steps.meta.outputs.build_date_short }}"
BRANCH_CLEAN="${{ steps.meta.outputs.branch_clean }}" BRANCH_CLEAN="${{ steps.meta.outputs.branch_clean }}"
if [[ "$BRANCH" == "main" ]]; then if [[ "${{ github.ref }}" == refs/tags/* ]]; then
TAG="${{ github.ref_name }}"
TAGS="${IMAGE}:${TAG}
${IMAGE}:latest"
elif [[ "$BRANCH" == "main" ]]; then
TAGS="${IMAGE}:latest TAGS="${IMAGE}:latest
${IMAGE}:${VERSION} ${IMAGE}:${VERSION}
${IMAGE}:${DATE}" ${IMAGE}:${DATE}"

View file

@ -21,8 +21,7 @@ spec:
type: RuntimeDefault type: RuntimeDefault
containers: containers:
- name: k8s-mgmt-pod - name: k8s-mgmt-pod
# Replace this placeholder with a pinned tag or digest in production. image: git.alcatrash.net/michael/k8s-mgmt-pod/k8s-mgmt-pod:v1.0
image: ghcr.io/<org>/<repo>/k8s-mgmt-pod:latest
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
ports: ports:
- name: ssh - name: ssh