-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (45 loc) · 1.52 KB
/
colrev_update.yml
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: Run colrev update
on:
workflow_dispatch:
schedule:
- cron: '10 2 * * 3'
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Install CoLRev
run: |
pip install git+https://github.com/CoLRev-Environment/colrev.git#egg=colrev
- name: Setup git
run: |
git config --global user.name "CoLRev update"
git config --global user.email "actions@users.noreply.github.com"
git config --global url.https://github.com/.insteadOf git://github.com/
- name: Set branch name
run: |
echo "BRANCH_NAME=colrev-update-$(date '+%Y-%m-%d_%H-%M-%S')" >> $GITHUB_ENV
echo ${{ env.BRANCH_NAME }}
- name: Switch to branch ${{ env.BRANCH_NAME }}
run: |
git checkout -b ${{ env.BRANCH_NAME }}
- name: Run CoLRev update
run: |
colrev search -f
colrev load
colrev prep
colrev prep --polish
colrev prescreen
colrev pdfs
colrev screen
git push --set-upstream origin ${{ env.BRANCH_NAME }}
- name: Create pull request
uses: repo-sync/pull-request@v2
with:
source_branch: "${{ env.BRANCH_NAME }}"
destination_branch: "main"
pr_title: "Pull CoLRev updates"
pr_body: |
*CoLRev updates*
_Created by [colrev gh-action](https://github.com/CoLRev-Environment/colrev/tree/main/colrev/template)_