deploy on push

This commit is contained in:
2025-12-19 10:02:26 +01:00
parent 3ac1b06410
commit 5400afa63c

View File

@@ -1,5 +1,5 @@
when:
event: [ tag ]
event: [ PUSH ]
steps:
build:
@@ -8,12 +8,12 @@ steps:
repo: ${FORGE_NAME}/${CI_REPO}
registry:
from_secret: local_registry
tags: latest,${CI_COMMIT_TAG}
tags: latest,${CI_COMMIT_SHA}
username:
from_secret: local_username
password:
from_secret: local_password
build-args: "BASE_URL=https://minimal-setups.de, RELEASETAG=${CI_COMMIT_TAG}"
build-args: "BASE_URL=https://minimal-setups.de, RELEASETAG=${CI_COMMIT_SHA}"
dockerfile: Dockerfile
@@ -31,7 +31,7 @@ steps:
commands:
- export GOPATH=/woodpecker/go # the export is required, otherwise trivy will not consider the variable
- HOME=/home/`id -nu`
- TAG="${CI_COMMIT_TAG:-$CI_COMMIT_TAG}"
- TAG="${CI_COMMIT_TAG:-$CI_COMMIT_SHA}"
- |
trivy image \
--server $TRIVY_URL \
@@ -39,7 +39,7 @@ steps:
--format cyclonedx \
--scanners license \
--output /tmp/sbom.xml \
$FORGE_NAME/$CI_REPO:$CI_COMMIT_TAG
$FORGE_NAME/$CI_REPO:$CI_COMMIT_SHA
- cat /tmp/sbom.xml
- |
curl -X "POST" \
@@ -57,7 +57,7 @@ steps:
KUBE_CONFIG_CONTENT:
from_secret: kube_config
commands:
- export IMAGE_TAG=$CI_COMMIT_TAG
- export IMAGE_TAG=$CI_COMMIT_SHA
- printf "$KUBE_CONFIG_CONTENT" > /tmp/kubeconfig
- export KUBECONFIG=/tmp/kubeconfig
- ./deployment/deploy.sh