From a4cae251d9d05157e4ec5a52c4bf16b326814fd6 Mon Sep 17 00:00:00 2001 From: Ashwin Kumar Sivakumar Date: Fri, 12 Jun 2026 21:54:48 +0530 Subject: [PATCH] fix: restore forgejo build workflow filename --- ...build-and-update-gitops.yml => build.yaml} | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) rename .gitea/workflows/{build-and-update-gitops.yml => build.yaml} (84%) diff --git a/.gitea/workflows/build-and-update-gitops.yml b/.gitea/workflows/build.yaml similarity index 84% rename from .gitea/workflows/build-and-update-gitops.yml rename to .gitea/workflows/build.yaml index 194d810..70c8811 100644 --- a/.gitea/workflows/build-and-update-gitops.yml +++ b/.gitea/workflows/build.yaml @@ -7,8 +7,10 @@ on: - high-performance jobs: - build-and-push: + build: runs-on: ubuntu-latest + env: + DOCKER_HOST: unix:///var/run/docker.sock steps: - name: Checkout uses: actions/checkout@v4 @@ -31,7 +33,7 @@ jobs: docker push registry.nxtgauge.com/nxtgauge-frontend-solid:latest update-gitops: - needs: build-and-push + needs: build runs-on: ubuntu-latest steps: - name: Update GitOps frontend tag @@ -49,12 +51,17 @@ jobs: cd "${TMP_DIR}" python3 - <<'PY' from pathlib import Path +import os path = Path('apps/nxtgauge-frontend-solid/overlays/prod/kustomization.yaml') -text = path.read_text() -old = 'newTag: latest' -if old not in text: - raise SystemExit('expected frontend newTag line not found') -path.write_text(text.replace(old, f'newTag: ' + __import__('os').environ['IMAGE_TAG'], 1)) +lines = path.read_text().splitlines() +out = [] +for line in lines: + if line.strip().startswith('newTag:'): + indent = line[:len(line) - len(line.lstrip())] + out.append(f"{indent}newTag: {os.environ['IMAGE_TAG']}") + else: + out.append(line) +path.write_text('\n'.join(out) + '\n') PY git config user.name "forgejo-actions" git config user.email "forgejo-actions@nxtgauge.com"