This commit is contained in:
@@ -1,20 +1,33 @@
|
|||||||
when:
|
when:
|
||||||
branch: main
|
- branch: main
|
||||||
event: push
|
event: push
|
||||||
|
path:
|
||||||
|
exclude:
|
||||||
|
- 'k8s/**'
|
||||||
|
on_empty: true
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build-and-push
|
- name: build-and-push
|
||||||
image: gcr.io/kaniko-project/executor:debug
|
image: woodpeckerci/plugin-kaniko
|
||||||
environment:
|
settings:
|
||||||
DOCKER_USERNAME:
|
registry: git.mikhailkilin.ru
|
||||||
|
repo: git.mikhailkilin.ru/killingdruid/bcard
|
||||||
|
tags: ${CI_COMMIT_SHA}
|
||||||
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
DOCKER_PASSWORD:
|
password:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
entrypoint: ["/busybox/sh"]
|
|
||||||
commands:
|
|
||||||
- echo hello from kaniko debug
|
|
||||||
|
|
||||||
- name: update-manifests
|
- name: update-manifests
|
||||||
image: alpine
|
image: alpine/git
|
||||||
|
environment:
|
||||||
|
GITEA_USER:
|
||||||
|
from_secret: docker_username
|
||||||
|
GITEA_PASS:
|
||||||
|
from_secret: docker_password
|
||||||
commands:
|
commands:
|
||||||
- echo hello from alpine
|
- 'sed -i "s#image: git.mikhailkilin.ru/killingdruid/bcard:.*#image: git.mikhailkilin.ru/killingdruid/bcard:${CI_COMMIT_SHA}#" k8s/bcard.yaml'
|
||||||
|
- git config user.email "woodpecker@ci"
|
||||||
|
- git config user.name "Woodpecker CI"
|
||||||
|
- git add k8s/bcard.yaml
|
||||||
|
- 'git diff --cached --quiet && echo "No changes" || (git commit -m "[CI SKIP] deploy: ${CI_COMMIT_SHA}" && git remote set-url origin https://${GITEA_USER}:${GITEA_PASS}@git.mikhailkilin.ru/killingdruid/bcard.git && git push origin HEAD:main)'
|
||||||
|
|||||||
Reference in New Issue
Block a user