From 27bcfb7f014a97ca3ad631dae89e348fd64d11c8 Mon Sep 17 00:00:00 2001 From: logikonline Date: Sat, 17 Jan 2026 22:29:47 -0500 Subject: [PATCH] ci: fix git URL rewrite for public vault module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rewrite direct.git.marketally.com to git.marketally.com for reading public modules. Clear stale VCS cache and override GOPRIVATE. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .gitea/workflows/build.yml | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 0d3bcf5461..267f99ab38 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -42,11 +42,12 @@ jobs: - name: Configure git for public modules run: | - # Vault is now public - clear any cached credentials and allow anonymous access - git config --global credential.helper "" - rm -rf ~/go/pkg/mod/cache/vcs/*marketally* 2>/dev/null || true + rm -rf /root/go/pkg/mod/cache/vcs/*marketally* 2>/dev/null || true + git config --global url."https://git.marketally.com/".insteadOf "https://direct.git.marketally.com/" - name: Update vault dependency + env: + GOPRIVATE: "" run: | VAULT_VERSION="${{ steps.vault.outputs.version }}" echo "Building with vault $VAULT_VERSION" @@ -94,10 +95,14 @@ jobs: - name: Configure git for public modules run: | + rm -rf /root/go/pkg/mod/cache/vcs/*marketally* 2>/dev/null || true + rm -rf $HOME/go/pkg/mod/cache/vcs/*marketally* 2>/dev/null || true git config --global credential.helper "" - rm -rf ~/go/pkg/mod/cache/vcs/*marketally* 2>/dev/null || true + git config --global url."https://git.marketally.com/".insteadOf "https://direct.git.marketally.com/" - name: Update vault dependency + env: + GOPRIVATE: "" run: | VAULT_VERSION="${{ steps.vault.outputs.version }}" sed -i "s|replace git.marketally.com/gitcaddy/vault => ../gitcaddy-vault|replace git.marketally.com/gitcaddy/vault => git.marketally.com/gitcaddy/vault $VAULT_VERSION|" go.mod @@ -152,10 +157,12 @@ jobs: - name: Configure git for public modules run: | - git config --global credential.helper "" - rm -rf ~/go/pkg/mod/cache/vcs/*marketally* 2>/dev/null || true + rm -rf /root/go/pkg/mod/cache/vcs/*marketally* 2>/dev/null || true + git config --global url."https://git.marketally.com/".insteadOf "https://direct.git.marketally.com/" - name: Update vault dependency + env: + GOPRIVATE: "" run: | VAULT_VERSION="${{ steps.vault.outputs.version }}" sed -i "s|replace git.marketally.com/gitcaddy/vault => ../gitcaddy-vault|replace git.marketally.com/gitcaddy/vault => git.marketally.com/gitcaddy/vault $VAULT_VERSION|" go.mod @@ -303,18 +310,20 @@ jobs: - name: Configure git for public modules (Unix) if: matrix.goos != 'windows' run: | - git config --global credential.helper "" - rm -rf ~/go/pkg/mod/cache/vcs/*marketally* 2>/dev/null || true + rm -rf /root/go/pkg/mod/cache/vcs/*marketally* 2>/dev/null || true + git config --global url."https://git.marketally.com/".insteadOf "https://direct.git.marketally.com/" - name: Configure git for public modules (Windows) if: matrix.goos == 'windows' shell: pwsh run: | - git config --global credential.helper "" Remove-Item -Path "$env:USERPROFILE\go\pkg\mod\cache\vcs\*marketally*" -Recurse -Force -ErrorAction SilentlyContinue + git config --global url."https://git.marketally.com/".insteadOf "https://direct.git.marketally.com/" - name: Update vault dependency (Unix) if: matrix.goos != 'windows' + env: + GOPRIVATE: "" run: | VAULT_VERSION="${{ steps.vault.outputs.version }}" echo "Building with vault $VAULT_VERSION" @@ -325,6 +334,8 @@ jobs: - name: Update vault dependency (Windows) if: matrix.goos == 'windows' shell: pwsh + env: + GOPRIVATE: "" run: | $vaultVersion = "${{ steps.vault-win.outputs.version }}" Write-Host "Building with vault $vaultVersion" @@ -566,10 +577,12 @@ jobs: - name: Configure git for public modules run: | - git config --global credential.helper "" - rm -rf ~/go/pkg/mod/cache/vcs/*marketally* 2>/dev/null || true + rm -rf /root/go/pkg/mod/cache/vcs/*marketally* 2>/dev/null || true + git config --global url."https://git.marketally.com/".insteadOf "https://direct.git.marketally.com/" - name: Update vault dependency + env: + GOPRIVATE: "" run: | VAULT_VERSION="${{ steps.vault.outputs.version }}" echo "Building with vault $VAULT_VERSION"