Metrics #482
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: Metrics | |
on: | |
# Schedule daily updates | |
schedule: [{cron: "0 0 * * *"}] | |
# (optional) Run workflow manually | |
workflow_dispatch: | |
# (optional) Run workflow when pushing on master/main | |
# push: {branches: ["master", "main"]} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- uses: actions/cache@v2 | |
name: Configure pip caching | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install Python dependencies | |
run: | | |
python -m pip install -r requirements.txt | |
- name: Update README | |
run: |- | |
python build_readme.py | |
cat README.md | |
- name: Commit and push if changed | |
run: |- | |
git diff | |
git config --global user.email "[email protected]" | |
git config --global user.name "README-bot" | |
git add -A | |
git commit -m "Updated content" || exit 0 | |
git push | |
# github-metrics: | |
# runs-on: ubuntu-latest | |
# permissions: | |
# contents: write | |
# steps: | |
# - uses: lowlighter/metrics@latest | |
# with: | |
# token: ${{ secrets.METRICS_TOKEN }} | |
# output_action: gist | |
# committer_gist: 42365ee9c6c492a7b36bc31f7ec0240f | |
# base: header | |
# # plugin_languages: yes | |
# # plugin_languages_ignored: c, c++, html, css, cmake | |
# # plugin_languages_recent_load: 400 | |
# plugin_achievements: yes | |
# plugin_achievements_threshold: A | |
# plugin_calendar: yes | |
# plugin_calendar_limit: 6 |