-
-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (38 loc) · 1.36 KB
/
detector.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
50
name: Detector
on:
schedule:
- cron: '17 */12 * * *'
workflow_dispatch:
jobs:
check:
runs-on: ubuntu-latest
container:
image: archlinux
env:
CACTUS_CONFIG: ${{ secrets.CACTUS_CONFIG }}
steps:
- uses: arch4edu/cactus/actions/upgrade-archlinux@main
id: init
- name: Install runtime dependencies
run: pacman -S --noconfirm --needed nvchecker python-mysqlclient
- uses: arch4edu/cactus/actions/setup-cactus@main
- name: Export configurations
id: config
run: python -m cactus.common.config
- name: Set up nvchecker cache
uses: actions/cache@master
with:
path: nvchecker
key: nvchecker-${{ steps.init.outputs.time }}
restore-keys: nvchecker
- uses: arch4edu/cactus/actions/checkout-repository@main
- name: Collecting cactus.yaml
run: python -m cactus.detector.collect repository
- name: Run nvchecker
run: |
mkdir -p nvchecker
[ -f nvchecker/newver.json ] && mv nvchecker/newver.json nvchecker/oldver.json
sed "s/GITHUB_TOKEN/${{ steps.config.outputs.github_token }}/" cactus/detector/keyfile.toml > keyfile.toml
nvchecker --logger both -c nvchecker.toml | tee nvchecker.log
- name: Update database
run: python -m cactus.detector.update repository