update loc & downloads every 1 hour #25382
This file contains hidden or 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: update loc & downloads every 1 hour | |
on: | |
schedule: | |
# every 1 hour | |
- cron: "0 */1 * * *" | |
workflow_dispatch: | |
jobs: | |
update_loc: | |
runs-on: ubuntu-latest | |
steps: | |
- name: setup rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: install tokei | |
run: | | |
cargo install tokei --features all | |
- name: install python | |
uses: actions/setup-python@v5 | |
- name: install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install pygithub | |
- name: run script | |
run: | | |
git clone https://github.com/mendelsshop/git_function_history.git | |
cd git_function_history | |
git switch stats | |
python check_loc.py ${{ secrets.GITHUB_TOKEN }} | |
update_downloads: | |
runs-on: ubuntu-latest | |
steps: | |
- name: install python | |
uses: actions/setup-python@v5 | |
- name: install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install pygithub | |
python -m pip install requests | |
python -m pip install toml | |
- name: run script | |
run: | | |
git clone https://github.com/mendelsshop/git_function_history.git | |
cd git_function_history | |
git switch stats | |
python check_downloads.py ${{ secrets.GITHUB_TOKEN }} |