ci: sed bump deploy values, fix adminpanel Dockerfile env.js
cabinet-ci-cd / test (push) Has been skipped
cabinet-ci-cd / parse-tag (push) Successful in 2s
cabinet-ci-cd / build-and-push (push) Successful in 21s
cabinet-ci-cd / deploy-gitops (push) Successful in 1s

This commit is contained in:
sova-ci
2026-06-09 16:25:49 +03:00
parent 04637aebeb
commit a2e8cf97b4
+7 -10
View File
@@ -86,18 +86,15 @@ jobs:
git config user.email "ci-bot@sova.local" git config user.email "ci-bot@sova.local"
git config user.name "sova-ci" git config user.name "sova-ci"
MAX_RETRIES=5 MAX_RETRIES=5
case "$(uname -m)" in bump_values() {
x86_64|amd64) YQ_ARCH=amd64 ;; local file="apps/cabinet/values-${ENV}.yaml"
aarch64|arm64) YQ_ARCH=arm64 ;; sed -i "s|^ repository:.*| repository: ${IMAGE_DEPLOY}|" "$file"
*) echo "Unsupported arch: $(uname -m)"; exit 1 ;; sed -i "s|^ tag:.*| tag: ${TAG}|" "$file"
esac sed -i "s|^ pullPolicy:.*| pullPolicy: IfNotPresent|" "$file"
curl -sSL -o /usr/local/bin/yq "https://github.com/mikefarah/yq/releases/download/v4.44.3/yq_linux_${YQ_ARCH}" }
chmod +x /usr/local/bin/yq
for attempt in $(seq 1 $MAX_RETRIES); do for attempt in $(seq 1 $MAX_RETRIES); do
git pull --rebase origin "${ENV}" git pull --rebase origin "${ENV}"
yq -i ".image.repository = \"${IMAGE_DEPLOY}\"" "apps/cabinet/values-${ENV}.yaml" bump_values
yq -i ".image.tag = \"${TAG}\"" "apps/cabinet/values-${ENV}.yaml"
yq -i ".image.pullPolicy = \"IfNotPresent\"" "apps/cabinet/values-${ENV}.yaml"
git add "apps/cabinet/values-${ENV}.yaml" git add "apps/cabinet/values-${ENV}.yaml"
git diff --cached --quiet && { echo "No changes"; exit 0; } git diff --cached --quiet && { echo "No changes"; exit 0; }
git commit -m "chore(cabinet): bump ${ENV} to ${TAG}" git commit -m "chore(cabinet): bump ${ENV} to ${TAG}"