-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
9 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,37 +8,32 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checkout the repository including submodules | ||
- name: Checkout repository with submodules | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
# Set Git committer identity | ||
- name: Set Git committer identity | ||
run: | | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
git config --global user.name "Your Name" | ||
git config --global user.email "your-email@example.com" # Use your GitHub email here | ||
# Pull the latest changes for each submodule using merge strategy and resolve conflicts automatically | ||
- name: Pull latest changes for submodules (auto resolve conflicts) | ||
run: | | ||
git submodule foreach 'git fetch && git merge -X theirs || true' | ||
# Commit and push changes | ||
- name: Commit and push changes | ||
env: | ||
TOKEN: ${{ secrets.wk_token }} # Use the PAT secret for authentication | ||
TOKEN: ${{ secrets.wk_token }} | ||
run: | | ||
if [ -n "$(git status --porcelain)" ]; then | ||
git config user.name "github-actions[bot]" | ||
git config user.email "github-actions[bot]@users.noreply.github.com" | ||
git add . | ||
git commit -m "Update submodules with merged changes" | ||
# Set up authentication using the token | ||
git config --global url."https://[email protected]/".insteadOf "https://github.com/" | ||
git commit -m "Beep-Boop: Update submodules with merged changes" | ||
# Set up authentication using your Personal Access Token (PAT) | ||
git remote set-url origin https://[email protected]/WatermelonKatanaDevs/WatermelonKatana.git | ||
# Push changes as your account (using your PAT for authentication) | ||
git push origin HEAD | ||
else | ||
echo "No changes in submodules to commit." | ||
|