File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Sync SamplesByPlatforms to Private Repo
2+
3+ on :
4+ push :
5+ branches : [ main, master ]
6+ paths :
7+ - ' Src/SamplesByPlatforms/**'
8+
9+ jobs :
10+ sync :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout source repo
14+ uses : actions/checkout@v3
15+ with :
16+ path : source
17+
18+ - name : Checkout target repo
19+ uses : actions/checkout@v3
20+ with :
21+ repository : xceedsoftware/xceed-zip-samplesbyplatforms
22+ token : ${{ secrets.PRIVATE_REPO_PAT }}
23+ path : target
24+
25+ - name : Copy files
26+ run : |
27+ rm -rf target/*
28+ cp -r source/Src/SamplesByPlatforms/* target/
29+
30+ - name : Commit and push changes
31+ run : |
32+ cd target
33+ git config user.name "GitHub Action"
34+ git config user.email "[email protected] " 35+ git add .
36+ git diff --quiet && git diff --staged --quiet || git commit -m "Sync from public repo: ${{ github.event.after }}"
37+ git push
You can’t perform that action at this time.
0 commit comments