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"