bun init
This commit is contained in:
@@ -40,17 +40,11 @@ jobs:
|
|||||||
git clone https://${{ secrets.USER }}:${{ secrets.GITEA }}@gitea.apps.kopikopi.com.ru/examples/nginx-intrasture.git
|
git clone https://${{ secrets.USER }}:${{ secrets.GITEA }}@gitea.apps.kopikopi.com.ru/examples/nginx-intrasture.git
|
||||||
cd nginx-intrasture/apps/static-site
|
cd nginx-intrasture/apps/static-site
|
||||||
|
|
||||||
# Устанавливаем Kustomize
|
wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O yq
|
||||||
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
|
chmod +x yq
|
||||||
|
|
||||||
# Обновляем тег образа через Kustomize (самый надежный способ)
|
|
||||||
./kustomize edit set image drone/test=harbor.apps.kopikopi.com.ru/drone/test:${{ steps.vars.outputs.sha_short }}
|
|
||||||
cat ./*
|
|
||||||
# Альтернатива: используем yq для точного редактирования
|
|
||||||
# wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O yq
|
|
||||||
# chmod +x yq
|
|
||||||
# ./yq eval -i '.images[0].newTag = "${{ steps.vars.outputs.sha_short }}"' kustomization.yaml
|
|
||||||
|
|
||||||
|
# Обновляем ТЕГ образа в deployment.yaml (не только в kustomization.yaml)
|
||||||
|
./yq eval -i '.spec.template.spec.containers[0].image = "harbor.apps.kopikopi.com.ru/drone/test:'${{ steps.vars.outputs.sha_short }}'"' deployment.yaml
|
||||||
# Коммитим и пушим
|
# Коммитим и пушим
|
||||||
git config user.name "CI/CD Bot"
|
git config user.name "CI/CD Bot"
|
||||||
git config user.email "ci-cd@kopikopi.com.ru"
|
git config user.email "ci-cd@kopikopi.com.ru"
|
||||||
|
|||||||
Reference in New Issue
Block a user