-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (37 loc) · 1.28 KB
/
cookbook_pr_opened.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Generate PR cache by copying main
on:
pull_request:
types:
- opened
- reopened
branches:
- main
jobs:
preprocess:
runs-on: ubuntu-latest
steps:
- name: Checkout deployment branch
uses: actions/checkout@v3
with:
ref: _cookbook_data_main
clean: false
- name: Copy cache from main to PR branch
shell: bash -l {0}
run: |
git config user.name github-actions
git config user.email [email protected]
git push origin HEAD:_cookbook_data_PR${{ github.event.number }}
- name: Add descriptive comment to PR
uses: thollander/actions-comment-pull-request@v2
with:
message: >
This repository caches data generated from notebooks stored in other
repositories in the `_cookbook_data_*` branches. Regenerating this
cache takes about half an hour, so it is not done automatically in
PRs. The current value of the cache from the `main` branch has been
copied over to this PR's cache.
To regenerate the cache for this PR, create a comment on this PR
consisting only of the string:
```
/regenerate-cache
```