Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions .github/workflows/actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,19 @@ jobs:
run: |
git config user.name "github-actions"
git config user.email "github-actions@github.com"
git fetch origin domain-replacement || true
git checkout -B domain-replacement

# Check if the branch exists remotely
if git ls-remote --exit-code --heads origin domain-replacement; then
echo "Branch 'domain-replacement' exists. Checking it out."
git fetch origin domain-replacement
git checkout domain-replacement
else
echo "Branch 'domain-replacement' does not exist. Creating it."
git checkout -b domain-replacement
fi

# git fetch origin domain-replacement || true
# git checkout -B domain-replacement
git add . ':!./.github/workflows/' ':!./.github/workflows/domain-replacer/'
if git diff --cached --quiet; then
echo "No changes to commit."
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/domain-replacer/replace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ set -e
echo "Scanning for files to update..."


find . -type f ! -path "./.github/workflows/*" | while read -r file; do
find . -type f ! -name "go.sum" ! -path "./.github/workflows/*" | while read -r file; do
echo "Checking $file"
if grep -q 'github.com/dell/' "$file"; then
echo "Updating $file"
Expand Down