-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (42 loc) · 1.35 KB
/
labot.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
49
name: Labot checks
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
install-and-run:
runs-on: ubuntu-latest # Use the latest Ubuntu environment
permissions:
contents: write
issues: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install git+https://github.com/digital-work-lab/labot.git
pip install colrev
- name: Set Git user name and email
run: |
git config --global user.name "Labot"
git config --global user.email "[email protected]"
git config --global url.https://github.com/.insteadOf git://github.com/
- name: workaround for detached HEAD
if: ${{ github.event_name == 'pull_request' }}
run: |
git fetch origin '+refs/heads/*:refs/remotes/origin/*'
git checkout ${GITHUB_HEAD_REF#refs/heads/} || git checkout -b ${GITHUB_HEAD_REF#refs/heads/} && git pull
- name: Run labot.repository.main()
run: |
python -m labot.repository
env:
GITHUB_TOKEN: ${{ secrets.MY_PAT_TOKEN }}