Skip to content

Commit

Permalink
Update autoUpdate.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
gosirys authored Sep 7, 2023
1 parent ac41581 commit 582193a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/autoUpdate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ jobs:

- name: Set up Git
run: |
git config --local user.email "[email protected]"
git config --local user.name "Osirys"
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git config --local http.https://github.com/.extraheader "AUTHORIZATION: bearer ${{ secrets.GITHUB_TOKEN }}"
- name: Pull latest changes for the main repo
run: git pull origin $(git branch --show-current) || echo "Failed to pull latest changes"
Expand All @@ -28,5 +29,6 @@ jobs:
run: |
git submodule update --init --recursive --depth=1 # Initialize all submodules first
git submodule foreach --recursive 'git fetch origin && git reset --hard origin/$(git rev-parse --abbrev-ref HEAD) || echo "Failed to reset submodule"'
- name: Commit and push submodule changes
run: git diff --quiet && git diff --staged --quiet || (git add . && git commit -m "Updated submodules" && git push --force-with-lease || echo "Push failed")

0 comments on commit 582193a

Please sign in to comment.