Skip to content

Commit

Permalink
Update update-submodules.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Colack authored Nov 18, 2024
1 parent 7391d55 commit b4e00eb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/update-submodules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@ jobs:
runs-on: ubuntu-latest

steps:
# Checkout the repository including submodules
- name: Checkout repository with submodules
uses: actions/checkout@v3
with:
submodules: recursive

- name: Pull latest changes for submodules (merge)
# Pull the latest changes for each submodule using merge strategy and allow unrelated histories
- name: Pull latest changes for submodules (merge, allow unrelated histories)
run: |
git submodule foreach 'git fetch && git pull origin $(git rev-parse --abbrev-ref HEAD) --no-rebase'
git submodule foreach 'git fetch && git pull origin $(git rev-parse --abbrev-ref HEAD) --no-rebase --allow-unrelated-histories'
# Commit and push changes if any submodules were updated
- name: Commit and push changes
run: |
if [ -n "$(git status --porcelain)" ]; then
Expand All @@ -28,4 +30,3 @@ jobs:
git push origin HEAD
else
echo "No changes in submodules to commit."
fi

0 comments on commit b4e00eb

Please sign in to comment.