File tree Expand file tree Collapse file tree 2 files changed +39
-2
lines changed
Expand file tree Collapse file tree 2 files changed +39
-2
lines changed Original file line number Diff line number Diff line change 1+ name : Sync Submodule
2+
3+ on :
4+ # Run on schedule (every 12 hours)
5+ schedule :
6+ - cron : " 0 */12 * * *"
7+ # Allow manual trigger
8+ workflow_dispatch :
9+
10+ jobs :
11+ sync :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Checkout repository
15+ uses : actions/checkout@v4
16+ with :
17+ submodules : true
18+ fetch-depth : 0
19+
20+ - name : Update submodule to latest
21+ run : |
22+ git submodule update --init --recursive --remote
23+ git config user.name "github-actions[bot]"
24+ git config user.email "github-actions[bot]@users.noreply.github.com"
25+
26+ - name : Check for changes and commit
27+ id : commit
28+ run : |
29+ if git diff --quiet; then
30+ echo "No submodule updates"
31+ echo "has_changes=false" >> $GITHUB_OUTPUT
32+ else
33+ git add part-of-my-brain
34+ git commit -m "chore: sync part-of-my-brain submodule"
35+ git push
36+ echo "has_changes=true" >> $GITHUB_OUTPUT
37+ fi
Original file line number Diff line number Diff line change 33 "type" : " module" ,
44 "version" : " 0.0.1" ,
55 "scripts" : {
6- "dev" : " astro dev" ,
6+ "dev" : " git submodule update --init --recursive --remote && astro dev" ,
77 "build" : " astro build" ,
88 "preview" : " astro preview" ,
99 "astro" : " astro"
1212 "astro" : " ^5.16.6" ,
1313 "remark-unwrap-images" : " ^5.0.0"
1414 }
15- }
15+ }
You can’t perform that action at this time.
0 commit comments