fix: escape pipe characters in woodpecker yaml
Use # delimiter instead of | for sed commands to avoid YAML parsing issues Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -55,12 +55,12 @@ steps:
|
||||
image: alpine:latest
|
||||
commands:
|
||||
- apk add --no-cache sed git
|
||||
- sed -i "s|image:.*hell-world-backend.*|image: registry.gecore.mn/library/hell-world-backend:${CI_COMMIT_SHA:0:8}|g" manifests/backend-deployment.yaml
|
||||
- sed -i "s|image:.*hell-world-frontend.*|image: registry.gecore.mn/library/hell-world-frontend:${CI_COMMIT_SHA:0:8}|g" manifests/frontend-deployment.yaml
|
||||
- 'sed -i "s#image:.*hell-world-backend.*#image: registry.gecore.mn/library/hell-world-backend:${CI_COMMIT_SHA:0:8}#g" manifests/backend-deployment.yaml'
|
||||
- 'sed -i "s#image:.*hell-world-frontend.*#image: registry.gecore.mn/library/hell-world-frontend:${CI_COMMIT_SHA:0:8}#g" manifests/frontend-deployment.yaml'
|
||||
- git config user.email "ci@gecore.mn"
|
||||
- git config user.name "Woodpecker CI"
|
||||
- git add manifests/
|
||||
- git commit -m "ci: update images to ${CI_COMMIT_SHA:0:8}" || true
|
||||
- 'git commit -m "ci: update images to ${CI_COMMIT_SHA:0:8}" || true'
|
||||
- git push origin main || true
|
||||
when:
|
||||
event: push
|
||||
|
||||
Reference in New Issue
Block a user