File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Sync to EasyLibrary
2+
3+ on :
4+ push :
5+ branches : [development]
6+ paths :
7+ - ' src/imperazim/form/**'
8+
9+ jobs :
10+ sync :
11+ if : " !contains(github.event.head_commit.message, '[sync]')"
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - name : Checkout LibForm
16+ uses : actions/checkout@v4
17+ with :
18+ path : standalone
19+
20+ - name : Checkout EasyLibrary
21+ uses : actions/checkout@v4
22+ with :
23+ repository : ImperaZim/EasyLibrary
24+ ref : development
25+ token : ${{ secrets.SYNC_TOKEN }}
26+ path : easylibrary
27+
28+ - name : Sync files
29+ run : |
30+ SRC="standalone/src/imperazim/form"
31+ DEST="easylibrary/src/imperazim/form"
32+
33+ rm -rf "$DEST"
34+ mkdir -p "$DEST"
35+
36+ rsync -av --exclude='LibForm.php' "$SRC/" "$DEST/"
37+
38+ - name : Commit and push
39+ run : |
40+ cd easylibrary
41+ git config user.name "github-actions[bot]"
42+ git config user.email "github-actions[bot]@users.noreply.github.com"
43+ if git diff --quiet && git diff --cached --quiet; then
44+ echo "No changes to sync"
45+ exit 0
46+ fi
47+ git add src/imperazim/form/
48+ git commit -m "[sync] Update embedded LibForm from standalone"
49+ git push
You can’t perform that action at this time.
0 commit comments