-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (29 loc) · 966 Bytes
/
Copy pathsync.yml
File metadata and controls
36 lines (29 loc) · 966 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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