24 lines
793 B
YAML
24 lines
793 B
YAML
when:
|
|
event:
|
|
- manual
|
|
- custom
|
|
|
|
steps:
|
|
update-values:
|
|
name: Update image tag in values.yaml
|
|
image: alpine:3.19
|
|
commands:
|
|
- apk add --no-cache git yq
|
|
- git config --global user.name "woodpecker-bot"
|
|
- git config --global user.email "ci@dvirlabs.com"
|
|
- git clone https://oauth2:${GITEA_TOKEN}@git.dvirlabs.com/dvirlabs/my-apps.git
|
|
- cd my-apps
|
|
- echo "Updating manifests/${APP_NAME}/values.yaml with tag ${IMAGE_TAG}"
|
|
- yq -i '.image.tag = strenv(IMAGE_TAG)' manifests/${APP_NAME}/values.yaml
|
|
- git add manifests/${APP_NAME}/values.yaml
|
|
- git commit -m "${APP_NAME}: update image tag to ${IMAGE_TAG}" || echo "No changes to commit"
|
|
- git push origin master
|
|
secrets:
|
|
from_secret:
|
|
- GITEA_TOKEN
|