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
All checks were successful
Build k8s-mgmt-pod image / Build & Push (push) Successful in 28s
This commit is contained in:
parent
4dbcde381f
commit
91cb88097f
2 changed files with 6 additions and 3 deletions
6
.github/workflows/build-workflow.yaml
vendored
6
.github/workflows/build-workflow.yaml
vendored
|
|
@ -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}"
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue