Skip to content

Commit 9a16eed

Browse files
committed
test commit
1 parent 2252f0e commit 9a16eed

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed

.github/workflows/create_cache.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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+

.github/workflows/merge_cache.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+

0 commit comments

Comments
 (0)