-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 1.27 KB
/
citation.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
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
concurrency:
group: ${{ github.ref }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
- name: Cache pip
uses: actions/cache@v2
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install dependencies
run: pip install -r requirements.txt
- name: Update citation
run: |
python src/update_citation.py
python src/update_readme.py
- name: Commit and push if needed
run: |-
git diff
git config --global user.email "[email protected]"
git config --global user.name "citation-bot"
git add -A
git commit -m "[Citation-Bot] update citation automatically" || exit 0
git push