Compare commits

..

9 Commits

Author SHA1 Message Date
Barcode Betty 76254d0dbb Merge pull request 'ci(CAR-1373): re-add deploy-dev/deploy-uat with PR-based base=dev/uat' (#36) from betty/car-1373-add-pr-deploy-jobs into dev
CI / deploy-uat (push) Has been skipped
CI / build-and-push (push) Successful in 20s
CI / deploy-dev (push) Failing after 4s
CI / build-and-push (pull_request) Has been skipped
CI / deploy-dev (pull_request) Has been skipped
CI / deploy-uat (pull_request) Has been skipped
2026-06-10 22:44:40 +00:00
Barcode Betty c4536afa5f ci(CAR-1373): re-add deploy-dev/deploy-uat with PR-based base=dev/uat
CI / build-and-push (pull_request) Has been skipped
CI / deploy-dev (pull_request) Has been skipped
CI / deploy-uat (pull_request) Has been skipped
Add deploy-dev and deploy-uat jobs to cartsnitch/auth:dev. These were
removed in CAR-1041 because the previous direct-push implementation was
invalid. Re-add them in the post-CAR-1371+1374 frontend pattern:

- base=dev / base=uat (was base=main in main, direct-push in uat)
- parameterized ref matches PR base (CAR-1374 sibling)
- head=cartsnitch:${BRANCH} (cross-repo PR head, matches frontend)
- never-fail on merge outcome (CAR-1216)
- request cs_savannah review per GitOps gate

cc @cpfarhood
2026-06-10 22:43:33 +00:00
Barcode Betty b4420b3f87 fix(ci): use direct docker login for Gitea registry (CAR-994)
CI / build-and-push (pull_request) Has been cancelled
CI / build-and-push (push) Successful in 11s
docker/login-action@v3 exits 1 against git.farh.net. Replace with a
direct docker login shell command using secrets.REGISTRY_TOKEN via
--password-stdin.

cc @cpfarhood
2026-06-02 14:16:15 +00:00
Savannah Savings 6c71a2a1f8 Merge pull request 'ci(CAR-1041): remove invalid deploy-dev/deploy-uat jobs' (#28) from betty/remove-deploy-jobs into dev
CI / build-and-push (push) Failing after 19s
2026-05-28 19:56:05 +00:00
Flea Flicker e308b15255 ci(CAR-1041): remove invalid deploy-dev/deploy-uat jobs
CI / build-and-push (pull_request) Has been skipped
Remove deploy-dev and deploy-uat CI jobs. CartSnitch uses Flux GitOps —
CI builds images, Flux deploys. These Actions-based deployment jobs were
added incorrectly in CAR-987.

Co-Authored-By: Barcode Betty <betty@cartsnitch>
2026-05-28 19:47:39 +00:00
Savannah Savings d066c14d4b Merge pull request 'Add *.farh.net origins to trustedOrigins (CAR-1034)' (#26) from betty/car-1034-trustedorigins-fix into dev
CI / build-and-push (push) Failing after 8s
CI / deploy-dev (push) Has been skipped
CI / deploy-uat (push) Has been skipped
CI / build-and-push (pull_request) Has been skipped
CI / deploy-uat (pull_request) Has been skipped
CI / deploy-dev (pull_request) Has been skipped
2026-05-25 21:27:53 +00:00
Barcode Betty 23ab939d2f Add *.farh.net origins back to trustedOrigins
CI / build-and-push (pull_request) Has been skipped
CI / deploy-dev (pull_request) Has been skipped
CI / deploy-uat (pull_request) Has been skipped
Fixes 403 errors on UAT auth endpoints (cartsnitch.uat.farh.net).
The previous change removed *.farh.net origins causing Better Auth
to reject requests from UAT environment.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-25 09:43:43 +00:00
Savannah Savings 359d108fee Merge pull request 'ci: use REGISTRY_TOKEN for docker login (CAR-1024)' (#24) from car-1023-use-registry-token into dev
CI / build-and-push (push) Failing after 6s
CI / deploy-dev (push) Has been skipped
CI / deploy-uat (push) Has been skipped
2026-05-24 20:52:35 +00:00
Barcode Betty f0291e8827 ci: use REGISTRY_TOKEN instead of GITEA_TOKEN for docker login (CAR-1024)
CI / build-and-push (pull_request) Has been skipped
CI / deploy-dev (pull_request) Has been skipped
CI / deploy-uat (pull_request) Has been skipped
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-24 20:46:48 +00:00
2 changed files with 25 additions and 22 deletions
+22 -22
View File
@@ -37,17 +37,17 @@ jobs:
run: | run: |
DATE_TAG=$(date -u +%Y.%m.%d) DATE_TAG=$(date -u +%Y.%m.%d)
EXISTING=$(git tag -l "v${DATE_TAG}*" | sort -V | tail -1) EXISTING=$(git tag -l "v${DATE_TAG}*" | sort -V | tail -1)
if [ -z "$EXISTING" ]; then VERSION="$DATE_TAG" if [ -z "$EXISTING" ]; then
elif [ "$EXISTING" = "v${DATE_TAG}" ]; then VERSION="${DATE_TAG}.2" VERSION="$DATE_TAG"
else BUILD_NUM=$(echo "$EXISTING" | sed "s/v${DATE_TAG}\.//"); VERSION="${DATE_TAG}.$((BUILD_NUM + 1))"; fi elif [ "$EXISTING" = "v${DATE_TAG}" ]; then
VERSION="${DATE_TAG}.2"
else
BUILD_NUM=$(echo "$EXISTING" | sed "s/v${DATE_TAG}\.//"); VERSION="${DATE_TAG}.$((BUILD_NUM + 1))";
fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT" echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Log in to Gitea Container Registry - name: Log in to Gitea Container Registry
uses: docker/login-action@v3 run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login ${{ env.REGISTRY }} -u "${{ github.actor }}" --password-stdin
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Extract metadata - name: Extract metadata
id: meta id: meta
@@ -83,7 +83,7 @@ jobs:
with: with:
repository: cartsnitch/infra repository: cartsnitch/infra
token: ${{ secrets.CI_GITEA_TOKEN }} token: ${{ secrets.CI_GITEA_TOKEN }}
ref: main ref: ${{ github.ref == 'refs/heads/main' && 'main' || (github.ref == 'refs/heads/uat' && 'uat' || 'dev') }}
path: infra path: infra
- name: Install kustomize - name: Install kustomize
@@ -132,8 +132,8 @@ jobs:
echo "::notice::Refusing to push directly to protected branch — falling back to contents API" echo "::notice::Refusing to push directly to protected branch — falling back to contents API"
exit 0 exit 0
fi fi
PR_BODY=$(jq -n --arg head "$BRANCH" --arg body "Bumps apps/overlays/dev/kustomization.yaml auth newTag to \`${{ steps.tag.outputs.tag }}\` from cartsnitch/auth CI build $GITHUB_SHA." \ PR_BODY=$(jq -n --arg head "cartsnitch:${BRANCH}" --arg base dev --arg title ("ci(dev): update auth image (" + env.GITHUB_SHA[:12] + ")") --arg body "Bumps apps/overlays/dev/kustomization.yaml auth newTag to \`${{ steps.tag.outputs.tag }}\` from cartsnitch/auth CI build $GITHUB_SHA." \
'{head: $head, base: "main", title: ("ci(dev): update auth image (" + env.GITHUB_SHA[:12] + ")"), body: $body}') '{head: $head, base: $base, title: $title, body: $body}')
PR_JSON=$(curl -sS -X POST \ PR_JSON=$(curl -sS -X POST \
-H "Authorization: token ${CI_GITEA_TOKEN}" \ -H "Authorization: token ${CI_GITEA_TOKEN}" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
@@ -153,6 +153,11 @@ jobs:
if [ "${REVIEW_HTTP}" -lt 200 ] || [ "${REVIEW_HTTP}" -ge 300 ]; then if [ "${REVIEW_HTTP}" -lt 200 ] || [ "${REVIEW_HTTP}" -ge 300 ]; then
echo "::notice::Failed to request reviewers for cartsnitch/infra PR #${PR_NUM} (HTTP ${REVIEW_HTTP}); continuing" echo "::notice::Failed to request reviewers for cartsnitch/infra PR #${PR_NUM} (HTTP ${REVIEW_HTTP}); continuing"
fi fi
# CAR-1216: the in-job merge attempt is a best-effort fast-path only.
# `cartsnitch/infra` main requires a human approving review; the CI bot
# cannot self-approve. Treat any non-merged outcome (approvals pending,
# checks pending, any other Gitea message) as the GitOps approval gate
# — the PR is already opened and cs_savannah is requested as reviewer.
MERGE_RESP=$(curl -sS -X POST \ MERGE_RESP=$(curl -sS -X POST \
-H "Authorization: token ${CI_GITEA_TOKEN}" \ -H "Authorization: token ${CI_GITEA_TOKEN}" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
@@ -160,11 +165,8 @@ jobs:
"https://git.farh.net/api/v1/repos/cartsnitch/infra/pulls/${PR_NUM}/merge") "https://git.farh.net/api/v1/repos/cartsnitch/infra/pulls/${PR_NUM}/merge")
MERGED=$(echo "$MERGE_RESP" | jq -r '.merged // false') MERGED=$(echo "$MERGE_RESP" | jq -r '.merged // false')
if [ "$MERGED" = "true" ]; then if [ "$MERGED" = "true" ]; then
echo "PR #${PR_NUM} merged into cartsnitch/infra main" echo "PR #${PR_NUM} merged into cartsnitch/infra dev"
elif echo "$MERGE_RESP" | grep -qi 'does not have enough approvals'; then elif echo "$MERGE_RESP" | grep -qi 'does not have enough approvals'; then
# GitOps approval gate: PR is correctly opened and surfaces in
# CTO queue via the reviewers request above. Treat as success
# so the job does not hard-fail on approvals.
echo "::notice::infra PR #${PR_NUM} opened and awaiting CTO (cs_savannah) approve+merge — GitOps approval gate, not a failure" echo "::notice::infra PR #${PR_NUM} opened and awaiting CTO (cs_savannah) approve+merge — GitOps approval gate, not a failure"
exit 0 exit 0
else else
@@ -182,7 +184,7 @@ jobs:
with: with:
repository: cartsnitch/infra repository: cartsnitch/infra
token: ${{ secrets.CI_GITEA_TOKEN }} token: ${{ secrets.CI_GITEA_TOKEN }}
ref: main ref: ${{ github.ref == 'refs/heads/main' && 'main' || (github.ref == 'refs/heads/uat' && 'uat' || 'dev') }}
path: infra path: infra
- name: Install kustomize - name: Install kustomize
@@ -231,8 +233,8 @@ jobs:
echo "::notice::Refusing to push directly to protected branch — falling back to contents API" echo "::notice::Refusing to push directly to protected branch — falling back to contents API"
exit 0 exit 0
fi fi
PR_BODY=$(jq -n --arg head "$BRANCH" --arg body "Bumps apps/overlays/uat/kustomization.yaml auth newTag to \`${{ steps.tag.outputs.tag }}\` from cartsnitch/auth CI build $GITHUB_SHA." \ PR_BODY=$(jq -n --arg head "cartsnitch:${BRANCH}" --arg base uat --arg title ("ci(uat): update auth image (" + env.GITHUB_SHA[:12] + ")") --arg body "Bumps apps/overlays/uat/kustomization.yaml auth newTag to \`${{ steps.tag.outputs.tag }}\` from cartsnitch/auth CI build $GITHUB_SHA." \
'{head: $head, base: "main", title: ("ci(uat): update auth image (" + env.GITHUB_SHA[:12] + ")"), body: $body}') '{head: $head, base: $base, title: $title, body: $body}')
PR_JSON=$(curl -sS -X POST \ PR_JSON=$(curl -sS -X POST \
-H "Authorization: token ${CI_GITEA_TOKEN}" \ -H "Authorization: token ${CI_GITEA_TOKEN}" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
@@ -252,6 +254,7 @@ jobs:
if [ "${REVIEW_HTTP}" -lt 200 ] || [ "${REVIEW_HTTP}" -ge 300 ]; then if [ "${REVIEW_HTTP}" -lt 200 ] || [ "${REVIEW_HTTP}" -ge 300 ]; then
echo "::notice::Failed to request reviewers for cartsnitch/infra PR #${PR_NUM} (HTTP ${REVIEW_HTTP}); continuing" echo "::notice::Failed to request reviewers for cartsnitch/infra PR #${PR_NUM} (HTTP ${REVIEW_HTTP}); continuing"
fi fi
# CAR-1216: see deploy-dev — same never-fail on merge outcome.
MERGE_RESP=$(curl -sS -X POST \ MERGE_RESP=$(curl -sS -X POST \
-H "Authorization: token ${CI_GITEA_TOKEN}" \ -H "Authorization: token ${CI_GITEA_TOKEN}" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
@@ -259,11 +262,8 @@ jobs:
"https://git.farh.net/api/v1/repos/cartsnitch/infra/pulls/${PR_NUM}/merge") "https://git.farh.net/api/v1/repos/cartsnitch/infra/pulls/${PR_NUM}/merge")
MERGED=$(echo "$MERGE_RESP" | jq -r '.merged // false') MERGED=$(echo "$MERGE_RESP" | jq -r '.merged // false')
if [ "$MERGED" = "true" ]; then if [ "$MERGED" = "true" ]; then
echo "PR #${PR_NUM} merged into cartsnitch/infra main" echo "PR #${PR_NUM} merged into cartsnitch/infra uat"
elif echo "$MERGE_RESP" | grep -qi 'does not have enough approvals'; then elif echo "$MERGE_RESP" | grep -qi 'does not have enough approvals'; then
# GitOps approval gate: PR is correctly opened and surfaces in
# CTO queue via the reviewers request above. Treat as success
# so the job does not hard-fail on approvals.
echo "::notice::infra PR #${PR_NUM} opened and awaiting CTO (cs_savannah) approve+merge — GitOps approval gate, not a failure" echo "::notice::infra PR #${PR_NUM} opened and awaiting CTO (cs_savannah) approve+merge — GitOps approval gate, not a failure"
exit 0 exit 0
else else
+3
View File
@@ -115,6 +115,9 @@ export const auth = betterAuth({
trustedOrigins: [ trustedOrigins: [
"http://localhost:3000", "http://localhost:3000",
"http://localhost:5173", "http://localhost:5173",
"https://cartsnitch.farh.net",
"https://cartsnitch.dev.farh.net",
"https://cartsnitch.uat.farh.net",
"https://cartsnitch.com", "https://cartsnitch.com",
"https://dev.cartsnitch.com", "https://dev.cartsnitch.com",
"https://uat.cartsnitch.com", "https://uat.cartsnitch.com",