Skip to content

Run plugin-github-api #2662

Run plugin-github-api

Run plugin-github-api #2662

Workflow file for this run

name: Run plugin-github-api
on:
schedule:
- cron: '0 0/3 * * *'
push:
branches:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
RUST_LOG: info
# database branch
DATABASE: main
BOT: 1
GH_TOKEN: ${{ secrets.GH_TOKEN }}
OS_CHECKER_CONFIGS: repos-default.json repos-ui.json
jobs:
run:
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/checkout@v4
- name: Generate list.json
run: |
gh release download -R kern-crates/.github -p os-checker_config.json -O repos-default.json
wget https://raw.githubusercontent.com/os-checker/os-checker/refs/heads/main/assets/repos-ui.json
# jq 'to_entries | map(.key) + ["os-checker/os-checker", "os-checker/os-checker.github.io"]' repos-default.json > list.json
tree --help
tree --gitignore -h
- name: Install os-checker
run: |
wget https://github.com/os-checker/database/releases/download/precompiled-checkers/os-checker -O ~/.cargo/bin/os-checker
chmod +x ~/.cargo/bin/os-checker
os-checker config --list-repos
- name: Install plugin-github-api
run: cargo install --path .
- name: Run plugin-github-api
run: |
os-checker-plugin-github-api # demo_jsons/list.json
tree --gitignore -h github-api
- name: Push to database
env:
PLUGIN_PATH: plugin/github-api
run: |
git config --global user.name "zjp-CN[bot]"
git config --global user.email "zjp-CN[bot]@users.noreply.github.com"
git config --global committer.name "zjp-CN[bot]"
git config --global committer.email "zjp-CN[bot]@users.noreply.github.com"
echo "正在 clone os-checker/database"
gh repo clone os-checker/database
gh auth setup-git
echo "成功 clone os-checker/database"
cd database
git switch ${{ env.DATABASE }}
rm -rf ${{ env.PLUGIN_PATH }}
mkdir -p plugin
mv ../github-api plugin
bash ../demo_jsons/push.sh