Merge branch 'main' of https://git.simplifiquehc.com.br/simplifique/Vendaweb-portal
All checks were successful
Build (develop) / Promote (main) / build-and-push-deploy (push) Successful in 5m33s

This commit is contained in:
Luis Eduardo Estevao
2026-02-18 13:32:19 -03:00
4 changed files with 13 additions and 9 deletions

View File

@@ -15,7 +15,7 @@ jobs:
- name: Build and Push - name: Build and Push
run: | run: |
set -euo pipefail set -euo pipefail
REGISTRY="git.simplifiquehc.com.br" REGISTRY="172.35.0.216:3000"
IMAGE_NAME="$REGISTRY/simplifique/vendaweb-portal" IMAGE_NAME="$REGISTRY/simplifique/vendaweb-portal"
SHA_TAG=$(echo "${{ github.sha }}" | cut -c1-7) SHA_TAG=$(echo "${{ github.sha }}" | cut -c1-7)
@@ -45,22 +45,26 @@ jobs:
run: | run: |
set -euo pipefail set -euo pipefail
SHA_TAG=$(echo "${{ github.sha }}" | cut -c1-7) SHA_TAG=$(echo "${{ github.sha }}" | cut -c1-7)
IMAGE_NAME="git.simplifiquehc.com.br/simplifique/vendaweb-portal"
MANIFEST_FILE="k8s/overlays/prod/deployment-image-digest-patch.yaml" MANIFEST_FILE="k8s/overlays/prod/deployment-image-digest-patch.yaml"
sed -i -E "s|^([[:space:]]*image: ${IMAGE_NAME}:).*|\\1${SHA_TAG}|g" "$MANIFEST_FILE" # Match image line for vendaweb-portal and replace tag (works with any registry hostname)
sed -i -E "s|(image: .*vendaweb-portal:).*|\1${SHA_TAG}|" "$MANIFEST_FILE"
if [ -z "${{ secrets.GITEA_TOKEN }}" ]; then if [ -z "${{ secrets.GITEA_TOKEN }}" ]; then
echo "Missing secrets.GITEA_TOKEN (needed to push back to repo)" echo "Missing secrets.GITEA_TOKEN (needed to push back to repo)"
exit 1 exit 1
fi fi
git remote set-url origin "https://${{ github.actor }}:${{ secrets.GITEA_TOKEN }}@git.simplifiquehc.com.br/simplifique/Vendaweb-portal.git" git remote set-url origin "http://${{ github.actor }}:${{ secrets.GITEA_TOKEN }}@172.35.0.216:3000/simplifique/Vendaweb-portal.git"
git config user.name "Gitea Action" git config user.name "Gitea Action"
git config user.email "actions@simplifiquehc.com.br" git config user.email "actions@simplifiquehc.com.br"
git add "$MANIFEST_FILE" git add "$MANIFEST_FILE"
if git diff --staged --quiet; then
echo "Manifest already has image tag $SHA_TAG, nothing to commit"
else
git commit -m "chore: update image tag to $SHA_TAG [skip ci]" git commit -m "chore: update image tag to $SHA_TAG [skip ci]"
git push origin main git push origin main
fi

View File

@@ -27,7 +27,7 @@ spec:
terminationGracePeriodSeconds: 30 terminationGracePeriodSeconds: 30
containers: containers:
- name: portal - name: portal
image: git.simplifiquehc.com.br/simplifique/vendaweb-portal:latest image: 172.35.0.216:3000/simplifique/vendaweb-portal:latest
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
ports: ports:
- name: http - name: http

View File

@@ -7,4 +7,4 @@ spec:
spec: spec:
containers: containers:
- name: portal - name: portal
image: git.simplifiquehc.com.br/simplifique/vendaweb-portal:d7edd99 image: 172.35.0.216:3000/simplifique/vendaweb-portal:161ed4d

View File

@@ -38,7 +38,7 @@
<link rel="preconnect" href="https://fonts.googleapis.com" /> <link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<script src="assets/env.js"></script> <script src="assets/env.js"></script>
<title>Plataforma Smart</title> <title>Plataforma Smarts</title>
</head> </head>
<body> <body>
<app-root></app-root> <app-root></app-root>