feat(leads): submit contact requests to native platform intake
This commit is contained in:
1 parent
41664c3d0d
commit
079764d93d
12 files changed
+760
-154
No files matched your search
@@ -33,7 +33,8 @@ jobs:
|
||||
- name: Static checks
|
||||
run: |
|
||||
cd /workspace/repo
|
||||
node --check server.js
|
||||
npm run check
|
||||
npm test
|
||||
git diff --check
|
||||
|
||||
- name: Login to Gitea Registry
|
||||
@@ -45,18 +46,51 @@ jobs:
|
||||
SHA: ${{ github.sha }}
|
||||
run: |
|
||||
cd /workspace/repo
|
||||
SHORT_SHA=${SHA:0:7}
|
||||
IMAGE_LC=$(echo "$IMAGE" | tr '[:upper:]' '[:lower:]')
|
||||
docker build \
|
||||
--build-arg APP_REVISION="$SHA" \
|
||||
-t "$IMAGE_LC:$SHORT_SHA" \
|
||||
-t "$IMAGE_LC:$SHA" \
|
||||
-t "$IMAGE_LC:main" \
|
||||
.
|
||||
docker push "$IMAGE_LC:$SHORT_SHA"
|
||||
docker push "$IMAGE_LC:$SHA"
|
||||
docker push "$IMAGE_LC:main"
|
||||
|
||||
- name: Trigger Coolify deploy
|
||||
env:
|
||||
COOLIFY_RESOURCE_UUID: ocwtt7rd2zijtlszgua005k9
|
||||
run: |
|
||||
curl -fsS -X POST \
|
||||
-H "Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}" \
|
||||
"https://saas-ctrl.com/api/v1/applications/ocwtt7rd2zijtlszgua005k9/start"
|
||||
"https://saas-ctrl.com/api/v1/deploy?uuid=${COOLIFY_RESOURCE_UUID}&force=true"
|
||||
|
||||
- name: Verify deployed revision and readiness
|
||||
env:
|
||||
EXPECTED_REVISION: ${{ github.sha }}
|
||||
READY_URL: https://tool-ctrl.de/readyz
|
||||
run: |
|
||||
for attempt in $(seq 1 36); do
|
||||
READY_RESPONSE=$(curl -fsS --max-time 10 "$READY_URL" 2>/dev/null || true)
|
||||
DEPLOYED_REVISION=$(printf '%s' "$READY_RESPONSE" | node -e '
|
||||
let body = "";
|
||||
process.stdin.on("data", (chunk) => { body += chunk; });
|
||||
process.stdin.on("end", () => {
|
||||
try {
|
||||
const parsed = JSON.parse(body);
|
||||
if (parsed.ok === true && typeof parsed.revision === "string") {
|
||||
process.stdout.write(parsed.revision);
|
||||
}
|
||||
} catch (_error) {}
|
||||
});
|
||||
' 2>/dev/null || true)
|
||||
|
||||
if [ "$DEPLOYED_REVISION" = "$EXPECTED_REVISION" ]; then
|
||||
echo "toolctrl-website is ready on revision $EXPECTED_REVISION"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Waiting for revision $EXPECTED_REVISION (attempt $attempt/36)"
|
||||
sleep 10
|
||||
done
|
||||
|
||||
echo "Timed out waiting for ready revision $EXPECTED_REVISION" >&2
|
||||
exit 1
|
||||
Reference in new issue
Block a user