Merge pull request 'Promote to Production: CAR-894 Gitea workflows migration' (#23) from uat into main
CI / deploy-uat (push) Has been skipped
CI / build-and-push (push) Failing after 4s
CI / deploy-dev (push) Has been skipped
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

This commit was merged in pull request #23.
This commit is contained in:
2026-05-24 18:51:45 +00:00
2 changed files with 12 additions and 33 deletions
@@ -16,12 +16,12 @@ permissions:
security-events: write security-events: write
env: env:
REGISTRY: ghcr.io REGISTRY: git.farh.net
IMAGE_NAME: cartsnitch/auth IMAGE_NAME: cartsnitch/auth
jobs: jobs:
build-and-push: build-and-push:
runs-on: runners-cartsnitch runs-on: ubuntu-latest
if: github.event_name == 'push' if: github.event_name == 'push'
outputs: outputs:
calver_tag: ${{ steps.calver.outputs.version }} calver_tag: ${{ steps.calver.outputs.version }}
@@ -42,12 +42,12 @@ jobs:
else BUILD_NUM=$(echo "$EXISTING" | sed "s/v${DATE_TAG}\.//"); VERSION="${DATE_TAG}.$((BUILD_NUM + 1))"; fi 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 GHCR - name: Log in to Gitea Container Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: ${{ env.REGISTRY }} registry: ${{ env.REGISTRY }}
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITEA_TOKEN }}
- name: Extract metadata - name: Extract metadata
id: meta id: meta
@@ -66,8 +66,6 @@ jobs:
push: true push: true
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Create git tag - name: Create git tag
if: github.ref == 'refs/heads/main' if: github.ref == 'refs/heads/main'
@@ -76,23 +74,14 @@ jobs:
git push origin "v${{ steps.calver.outputs.version }}" git push origin "v${{ steps.calver.outputs.version }}"
deploy-dev: deploy-dev:
runs-on: runners-cartsnitch runs-on: ubuntu-latest
needs: [build-and-push] needs: [build-and-push]
if: github.event_name == 'push' && (github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/main') if: github.event_name == 'push' && (github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/main')
steps: steps:
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.CARTSNITCH_APP_ID }}
private-key: ${{ secrets.CARTSNITCH_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: infra
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
repository: cartsnitch/infra repository: cartsnitch/infra
token: ${{ steps.app-token.outputs.token }} token: ${{ secrets.GITEA_TOKEN }}
ref: main ref: main
path: infra path: infra
@@ -110,7 +99,7 @@ jobs:
- name: Update auth image tag in dev overlay - name: Update auth image tag in dev overlay
run: | run: |
cd infra/apps/overlays/dev cd infra/apps/overlays/dev
kustomize edit set image ghcr.io/cartsnitch/auth:${{ steps.tag.outputs.tag }} kustomize edit set image ghcr.io/cartsnitch/auth=git.farh.net/cartsnitch/auth:${{ steps.tag.outputs.tag }}
- name: Commit and push to infra - name: Commit and push to infra
run: | run: |
@@ -124,23 +113,14 @@ jobs:
git push origin main git push origin main
deploy-uat: deploy-uat:
runs-on: runners-cartsnitch runs-on: ubuntu-latest
needs: [build-and-push] needs: [build-and-push]
if: github.event_name == 'push' && (github.ref == 'refs/heads/uat' || github.ref == 'refs/heads/main') if: github.event_name == 'push' && (github.ref == 'refs/heads/uat' || github.ref == 'refs/heads/main')
steps: steps:
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.CARTSNITCH_APP_ID }}
private-key: ${{ secrets.CARTSNITCH_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: infra
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
repository: cartsnitch/infra repository: cartsnitch/infra
token: ${{ steps.app-token.outputs.token }} token: ${{ secrets.GITEA_TOKEN }}
ref: main ref: main
path: infra path: infra
@@ -158,7 +138,7 @@ jobs:
- name: Update auth image tag in uat overlay - name: Update auth image tag in uat overlay
run: | run: |
cd infra/apps/overlays/uat cd infra/apps/overlays/uat
kustomize edit set image ghcr.io/cartsnitch/auth:${{ steps.tag.outputs.tag }} kustomize edit set image ghcr.io/cartsnitch/auth=git.farh.net/cartsnitch/auth:${{ steps.tag.outputs.tag }}
- name: Commit and push to infra - name: Commit and push to infra
run: | run: |
+2 -3
View File
@@ -116,8 +116,7 @@ export const auth = betterAuth({
"http://localhost:3000", "http://localhost:3000",
"http://localhost:5173", "http://localhost:5173",
"https://cartsnitch.com", "https://cartsnitch.com",
"https://cartsnitch.farh.net", "https://dev.cartsnitch.com",
"https://cartsnitch.dev.farh.net", "https://uat.cartsnitch.com",
"https://cartsnitch.uat.farh.net",
], ],
}); });