Skip to content
Merged
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
9 changes: 8 additions & 1 deletion .github/workflows/domain-replacer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
git config user.name "github-actions"
git config user.email "github-actions@github.com"

# 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
Expand All @@ -44,15 +43,23 @@ jobs:
git checkout -b domain-replacement
fi

# Unstage any workflow or action files
git reset .github/workflows/
git reset .github/workflows/domain-replacer/

# Add everything else
git add . ':!./.github/workflows/' ':!./.github/workflows/domain-replacer/'

if git diff --cached --quiet; then
echo "No changes to commit."
exit 0
fi

git commit -m "Replace external GitHub domain with internal Enterprise domain"
git pull --rebase origin domain-replacement || true
git push --force-with-lease origin domain-replacement


- name: Install GitHub CLI
run: |
sudo apt-get update
Expand Down