Skip to content

.github/workflows/sync.yml #4590

.github/workflows/sync.yml

.github/workflows/sync.yml #4590

Workflow file for this run

on:
schedule:
- cron: '0 * * * *' # every hour
workflow_dispatch: # allow manual
jobs:
sync:
name: Sync SensEdu
runs-on: ubuntu-latest
steps:
- name: Checkout Library Repo
uses: actions/checkout@v4
with:
ref: master
- name: Sync Original Folder
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git remote add upstream https://github.com/ShiegeChan/SensEdu.git
git fetch upstream
git checkout upstream/main -- libraries/SensEdu
cp -r -f libraries/SensEdu/* ./
rm -r libraries
git add .
if git diff-index --quiet HEAD --; then
echo "No changes, exiting..."
exit 0
fi
git commit -m "Sync: Updates from original repo libraries/SensEdu"
git push origin master