diff --git a/.github/workflows/ci.yml b/.gitea/workflows/ci.yml similarity index 79% rename from .github/workflows/ci.yml rename to .gitea/workflows/ci.yml index 94e9c91..1c86e8c 100644 --- a/.github/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -16,12 +16,12 @@ permissions: security-events: write env: - REGISTRY: ghcr.io + REGISTRY: git.farh.net IMAGE_NAME: cartsnitch/auth jobs: build-and-push: - runs-on: runners-cartsnitch + runs-on: ubuntu-latest if: github.event_name == 'push' outputs: 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 echo "version=$VERSION" >> "$GITHUB_OUTPUT" - - name: Log in to GHCR + - name: Log in to Gitea Container Registry uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + password: ${{ secrets.GITEA_TOKEN }} - name: Extract metadata id: meta @@ -66,8 +66,6 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max - name: Create git tag if: github.ref == 'refs/heads/main' @@ -76,23 +74,14 @@ jobs: git push origin "v${{ steps.calver.outputs.version }}" deploy-dev: - runs-on: runners-cartsnitch + runs-on: ubuntu-latest needs: [build-and-push] if: github.event_name == 'push' && (github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/main') 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 with: repository: cartsnitch/infra - token: ${{ steps.app-token.outputs.token }} + token: ${{ secrets.GITEA_TOKEN }} ref: main path: infra @@ -110,7 +99,7 @@ jobs: - name: Update auth image tag in dev overlay run: | 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 run: | @@ -124,23 +113,14 @@ jobs: git push origin main deploy-uat: - runs-on: runners-cartsnitch + runs-on: ubuntu-latest needs: [build-and-push] if: github.event_name == 'push' && (github.ref == 'refs/heads/uat' || github.ref == 'refs/heads/main') 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 with: repository: cartsnitch/infra - token: ${{ steps.app-token.outputs.token }} + token: ${{ secrets.GITEA_TOKEN }} ref: main path: infra @@ -158,7 +138,7 @@ jobs: - name: Update auth image tag in uat overlay run: | 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 run: | diff --git a/src/auth.ts b/src/auth.ts index b439590..09b493f 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -116,8 +116,7 @@ export const auth = betterAuth({ "http://localhost:3000", "http://localhost:5173", "https://cartsnitch.com", - "https://cartsnitch.farh.net", - "https://cartsnitch.dev.farh.net", - "https://cartsnitch.uat.farh.net", + "https://dev.cartsnitch.com", + "https://uat.cartsnitch.com", ], }); \ No newline at end of file