fix: restore forgejo build workflow filename
Some checks failed
build-and-push / build (push) Failing after 29s
Some checks failed
build-and-push / build (push) Failing after 29s
This commit is contained in:
parent
abf4095bf2
commit
a4cae251d9
1 changed files with 14 additions and 7 deletions
|
|
@ -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"
|
||||
Loading…
Add table
Reference in a new issue