ci: update VCS cache remotes instead of deleting
Some checks failed
Build and Release / Create Release (push) Successful in 0s
Build and Release / Lint (push) Failing after 48s
Build and Release / Build Binaries (amd64, windows, windows-latest) (push) Has been skipped
Build and Release / Build Binaries (amd64, linux, linux-latest) (push) Has been skipped
Build and Release / Build Binaries (amd64, darwin, macos) (push) Has been skipped
Build and Release / Build Binaries (arm64, darwin, macos) (push) Has been skipped
Build and Release / Build Binary (linux/arm64) (push) Has been skipped
Build and Release / Unit Tests (push) Failing after 43s
Build and Release / Integration Tests (PostgreSQL) (push) Failing after 32s
Some checks failed
Build and Release / Create Release (push) Successful in 0s
Build and Release / Lint (push) Failing after 48s
Build and Release / Build Binaries (amd64, windows, windows-latest) (push) Has been skipped
Build and Release / Build Binaries (amd64, linux, linux-latest) (push) Has been skipped
Build and Release / Build Binaries (amd64, darwin, macos) (push) Has been skipped
Build and Release / Build Binaries (arm64, darwin, macos) (push) Has been skipped
Build and Release / Build Binary (linux/arm64) (push) Has been skipped
Build and Release / Unit Tests (push) Failing after 43s
Build and Release / Integration Tests (PostgreSQL) (push) Failing after 32s
Find and update any cached VCS remotes that point to direct.git.marketally.com to use git.marketally.com instead. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -42,8 +42,18 @@ jobs:
|
||||
|
||||
- name: Configure git for public modules
|
||||
run: |
|
||||
# Delete entire VCS cache to clear any stale remotes
|
||||
rm -rf /root/go/pkg/mod/cache/vcs 2>/dev/null || true
|
||||
# Update any cached VCS remotes from direct to public URL
|
||||
for dir in /root/go/pkg/mod/cache/vcs/*/; do
|
||||
if [ -d "$dir/.git" ] || [ -d "$dir/refs" ]; then
|
||||
cd "$dir"
|
||||
REMOTE=$(git remote get-url origin 2>/dev/null || echo "")
|
||||
if echo "$REMOTE" | grep -q "direct.git.marketally.com"; then
|
||||
NEW_REMOTE=$(echo "$REMOTE" | sed 's|direct.git.marketally.com|git.marketally.com|g')
|
||||
echo "Updating $dir remote: $REMOTE -> $NEW_REMOTE"
|
||||
git remote set-url origin "$NEW_REMOTE" || true
|
||||
fi
|
||||
fi
|
||||
done
|
||||
git config --global url."https://git.marketally.com/".insteadOf "https://direct.git.marketally.com/"
|
||||
|
||||
- name: Update vault dependency
|
||||
@@ -96,7 +106,9 @@ jobs:
|
||||
|
||||
- name: Configure git for public modules
|
||||
run: |
|
||||
rm -rf /root/go/pkg/mod/cache/vcs 2>/dev/null || true
|
||||
for dir in /root/go/pkg/mod/cache/vcs/*/; do
|
||||
[ -d "$dir" ] && cd "$dir" && git remote set-url origin "$(git remote get-url origin | sed 's|direct.git.marketally.com|git.marketally.com|g')" 2>/dev/null || true
|
||||
done
|
||||
git config --global url."https://git.marketally.com/".insteadOf "https://direct.git.marketally.com/"
|
||||
|
||||
- name: Update vault dependency
|
||||
@@ -156,7 +168,9 @@ jobs:
|
||||
|
||||
- name: Configure git for public modules
|
||||
run: |
|
||||
rm -rf /root/go/pkg/mod/cache/vcs 2>/dev/null || true
|
||||
for dir in /root/go/pkg/mod/cache/vcs/*/; do
|
||||
[ -d "$dir" ] && cd "$dir" && git remote set-url origin "$(git remote get-url origin | sed 's|direct.git.marketally.com|git.marketally.com|g')" 2>/dev/null || true
|
||||
done
|
||||
git config --global url."https://git.marketally.com/".insteadOf "https://direct.git.marketally.com/"
|
||||
|
||||
- name: Update vault dependency
|
||||
@@ -309,14 +323,24 @@ jobs:
|
||||
- name: Configure git for public modules (Unix)
|
||||
if: matrix.goos != 'windows'
|
||||
run: |
|
||||
rm -rf /root/go/pkg/mod/cache/vcs 2>/dev/null || true
|
||||
for dir in /root/go/pkg/mod/cache/vcs/*/; do
|
||||
[ -d "$dir" ] && cd "$dir" && git remote set-url origin "$(git remote get-url origin | sed 's|direct.git.marketally.com|git.marketally.com|g')" 2>/dev/null || true
|
||||
done
|
||||
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: |
|
||||
Remove-Item -Path "$env:USERPROFILE\go\pkg\mod\cache\vcs" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Get-ChildItem "$env:USERPROFILE\go\pkg\mod\cache\vcs" -Directory -ErrorAction SilentlyContinue | ForEach-Object {
|
||||
Push-Location $_.FullName
|
||||
$remote = git remote get-url origin 2>$null
|
||||
if ($remote -like "*direct.git.marketally.com*") {
|
||||
$newRemote = $remote -replace "direct.git.marketally.com", "git.marketally.com"
|
||||
git remote set-url origin $newRemote 2>$null
|
||||
}
|
||||
Pop-Location
|
||||
}
|
||||
git config --global url."https://git.marketally.com/".insteadOf "https://direct.git.marketally.com/"
|
||||
|
||||
- name: Update vault dependency (Unix)
|
||||
@@ -576,7 +600,9 @@ jobs:
|
||||
|
||||
- name: Configure git for public modules
|
||||
run: |
|
||||
rm -rf /root/go/pkg/mod/cache/vcs 2>/dev/null || true
|
||||
for dir in /root/go/pkg/mod/cache/vcs/*/; do
|
||||
[ -d "$dir" ] && cd "$dir" && git remote set-url origin "$(git remote get-url origin | sed 's|direct.git.marketally.com|git.marketally.com|g')" 2>/dev/null || true
|
||||
done
|
||||
git config --global url."https://git.marketally.com/".insteadOf "https://direct.git.marketally.com/"
|
||||
|
||||
- name: Update vault dependency
|
||||
|
||||
Reference in New Issue
Block a user