Skip to content

Commit

Permalink
all in one run
Browse files Browse the repository at this point in the history
  • Loading branch information
racicLuka committed Apr 24, 2024
1 parent e6abac5 commit 7a5a99a
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/sync-weblate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,13 @@ jobs:
commits+=("$line")
done <<< "$output"
echo "$commits"
echo "{commits}=$commits" >> $GITHUB_OUTPUT
- name: Set Other Branches
id: set-other-branches
run: |
cd weblate-test
git fetch --prune --tags
output=$(git branch -r | grep -v "origin/main" | cut -d'/' -f2 | xargs)
declare -a OTHER_BRANCHES=()
while IFS= read -r line; do
OTHER_BRANCHES+=("$line")
done <<< "$output"
echo "these are the other branches $OTHER_BRANCHES"
echo "{other_branches}=$OTHER_BRANCHES" >> $GITHUB_OUTPUT
- name: Check for Commits in Other Branches
id: check-other-branches
run: |
cd weblate-test
MISSING_COMMITS=()
MISSING_BRANCHES=()
echo "branches ${{ steps.set-other-branches.outputs.other_branches }}"
Expand All @@ -61,14 +49,6 @@ jobs:
done
echo "$MISSING_COMMITS"
echo "$MISSING_BRANCHES"
echo "{missing_commits}=$MISSING_COMMITS[*]" >> $GITHUB_OUTPUT
echo "{missing_branches}=$MISSING_BRANCHES[*]" >> $GITHUB_OUTPUT
- name: Pull Weblate Commits to Other Branches
run: |
cd weblate-test
MISSING_COMMITS=(${{ steps.check-other-branches.outputs.missing_commits }})
MISSING_BRANCHES=(${{ steps.check-other-branches.outputs.missing_branches }})
echo "these are the missing commits $MISSING_COMMITS"
for ((i=0; i<=${#MISSING_COMMITS[@]}; ++i)); do
git checkout ${MISSING_BRANCHES[$i]}
Expand Down

0 comments on commit 7a5a99a

Please sign in to comment.