fix(woodpecker): fix secrets syntax - use environment with from_secret

This commit is contained in:
Ashwin Kumar 2026-04-10 05:24:44 +02:00
parent 365ffd3b62
commit a3622de8e9

View file

@ -3,7 +3,6 @@ when:
event: push
steps:
# Step 1: Detect if changes exist
- name: detect-changes
image: alpine/git
commands:
@ -34,7 +33,6 @@ steps:
# Export for other steps
cat .build-marker >> ${CI_ENV}
# Step 2: Build and push Docker image (only if changed)
- name: build-and-push
image: woodpeckerci/plugin-docker-buildx:5.0.0
settings:
@ -53,10 +51,11 @@ steps:
when:
- evaluate: 'env.SHOULD_BUILD == "true"'
# Step 3: Deploy to Kubernetes (only if changed)
- name: deploy
image: bitnami/kubectl:latest
secrets: [kube_config]
environment:
KUBE_CONFIG:
from_secret: kube_config
commands:
- |
#!/bin/bash
@ -91,9 +90,7 @@ steps:
kubectl get deployment/${DEPLOYMENT_NAME} -n ${NAMESPACE}
when:
- evaluate: 'env.SHOULD_BUILD == "true"'
- branch: [main, high-performance]
# Step 4: Notify status
- name: notify
image: alpine:latest
commands: