Skip to content

Sync OpenClash_Overwrite Submodule #17

Sync OpenClash_Overwrite Submodule

Sync OpenClash_Overwrite Submodule #17

name: Sync OpenClash_Overwrite Submodule
on:
schedule:
- cron: "0 */6 * * *"
workflow_dispatch:
permissions:
contents: write
jobs:
sync-submodule:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: true
- name: Update submodule
run: |
git -C overwrite/OpenClash_Overwrite fetch origin main
git -C overwrite/OpenClash_Overwrite checkout -B main origin/main
- name: Commit and push if needed
run: |
if [ -n "$(git status --porcelain)" ]; then
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add overwrite/OpenClash_Overwrite
git commit -m "chore(overwrite): bump OpenClash_Overwrite submodule"
git push origin HEAD:main
else
echo "No changes to commit."
fi