Skip to content

Commit

Permalink
Fix finding branches
Browse files Browse the repository at this point in the history
  • Loading branch information
ngaro committed Aug 8, 2024
1 parent 19b5904 commit 39bd360
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/update-readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ jobs:
name: Update README.md in all other branches
shell: bash
run: |
echo "We will sync the following files: \" $FILES_TO_SYNC \" from ${{ github.ref }} to all other branches being: $(git branch --format='%(refname)')"
echo "Setting up git"
git config --global user.email "$MY_EMAIL"
git config --global user.name "$MY_NAME"
echo "Finding all branches"
BRANCHES=$(git branch --format='%(refname:short)' -r | grep -v 'origin/HEAD' | sed 's/origin\///')
echo "We will sync the following files: \"$FILES_TO_SYNC\" from ${{ github.ref }} to all other branches being: \"$BRANCHES\""
for branch in $(git branch --format='%(refname)'); do
echo "Checking out $branch"
if [[ $branch == ${{ github.ref }} ]]; then
Expand Down

0 comments on commit 39bd360

Please sign in to comment.