Detector #1591
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |