File tree Expand file tree Collapse file tree 2 files changed +64
-0
lines changed
Expand file tree Collapse file tree 2 files changed +64
-0
lines changed Original file line number Diff line number Diff line change 1+ name : create Main
2+
3+ on :
4+ pull_request :
5+ types :
6+ - opened
7+ - synchronize # fires when commits are pushed to the PR
8+ - reopened
9+
10+ jobs :
11+ copy-cache :
12+ runs-on : ubuntu-22.04
13+
14+ steps :
15+ - name : Checkout PR branch
16+ uses : actions/checkout@v4
17+
18+ - name : Restore cache from PR branch
19+ uses : actions/cache@v3
20+ with :
21+ path : " ${{ github.workspace }}/test"
22+ key : test
23+
24+ - name : create test
25+ run : touch test
26+
27+ - name : Save ccache
28+ uses : actions/cache/save@v4
29+ id : cache_test
30+ with :
31+ path : " ${{ github.workspace }}/test"
32+ key : test
33+
Original file line number Diff line number Diff line change 1+ name : Sync Cache to Main
2+
3+ on :
4+ pull_request :
5+ types :
6+ - closed # fires when PR is closed (merged or not)
7+
8+ jobs :
9+ copy-cache :
10+ runs-on : ubuntu-22.04
11+
12+ steps :
13+ - name : Checkout main
14+ uses : actions/checkout@v4
15+ id : cache_test
16+ with :
17+ ref : main
18+
19+ - name : Restore cache from PR branch
20+ uses : actions/cache@v3
21+ with :
22+ path : " ${{ github.workspace }}/test"
23+ key : test
24+
25+ - name : Save ccache
26+ uses : actions/cache/save@v4
27+ id : cache_test
28+ with :
29+ path : " ${{ github.workspace }}/test"
30+ key : test
31+
You can’t perform that action at this time.
0 commit comments