Skip to content

Sync

Sync #3

Workflow file for this run

name: Sync
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
concurrency:
group: sync
cancel-in-progress: true
jobs:
update:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v5
with:
submodules: recursive
fetch-depth: 0
- name: Update submodule
run: git submodule update --remote --rebase
- name: Check update
run: |
if [[ -n "$(git status --porcelain)" ]]; then
echo "update=true" >> $GITHUB_ENV
else
echo "update=false" >> $GITHUB_ENV
fi
- name: Commit update
if: env.update == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "chore: sync with ejs"
git push origin main