Metrics #17895
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: Metrics | |
| on: | |
| # Schedule updates (each hour) | |
| schedule: [{cron: "0 * * * *"}] | |
| # Lines below let you run workflow manually and on each commit | |
| workflow_dispatch: | |
| push: {branches: ["master"]} | |
| jobs: | |
| github-metrics: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: lowlighter/metrics@latest | |
| with: | |
| token: ${{ secrets.METRICS_TOKEN }} | |
| # CORE CONFIGURATION | |
| user: Pyenb | |
| template: classic | |
| config_timezone: Europe/Berlin | |
| config_order: base.header, base.activity+community, base.repositories, languages, lines, isocalendar, repositories, stars, wakatime, gists, achievements, leetcode, pagespeed, music, steam | |
| repositories_affiliations: owner | |
| extras_css: | | |
| h1 {color: #8A2BE2;} | |
| h2 {color: #8A2BE2;} | |
| h3 {color: #F38CFE;} | |
| # LANGUAGES | |
| plugin_languages: no | |
| plugin_languages_sections: most-used | |
| plugin_languages_ignored: tex, css, html, perl, javascript | |
| # LINES | |
| plugin_lines: yes | |
| plugin_lines_history_limit: 1 | |
| plugin_lines_repositories_limit: 4 | |
| plugin_lines_sections: base | |
| # ISOCALENDAR | |
| plugin_isocalendar: no | |
| plugin_isocalendar_duration: half-year | |
| # STARS | |
| plugin_stars: no | |
| plugin_stars_limit: 3 | |
| plugin_traffic: yes | |
| # WAKATIME | |
| plugin_wakatime: no | |
| plugin_wakatime_user: Pyenb | |
| plugin_wakatime_repositories_visibility: public | |
| plugin_wakatime_languages_other: yes | |
| plugin_wakatime_days: 365 | |
| plugin_wakatime_token: ${{ secrets.WAKA }} | |
| # ACHIEVEMENTS | |
| plugin_achievements: no | |
| plugin_achievements_display: compact | |
| plugin_achievements_secrets: yes | |
| plugin_achievements_threshold: C | |
| plugin_achievements_limit: 6 | |
| # MUSIC | |
| plugin_music: no | |
| plugin_music_limit: 3 | |
| plugin_music_mode: recent | |
| plugin_music_provider: spotify | |
| plugin_music_time_range: medium | |
| plugin_music_top_type: tracks | |
| plugin_music_user: ${{ secrets.SPOTIFY_USER }} | |
| plugin_music_played_at: no | |
| plugin_music_token: ${{ secrets.SPOTIFY_TOKENS }} | |
| # STEAM | |
| plugin_steam: no | |
| plugin_steam_token: ${{ secrets.STEAM_TOKEN }} | |
| plugin_steam_sections: recently-played | |
| plugin_steam_user: "${{ secrets.STEAM_USER }}" | |
| plugin_steam_recent_games_limit: 1 | |
| - uses: actions/checkout@v4 | |
| - name: Pull latest changes from remote | |
| if: success() | |
| run: git pull origin master | |
| # - name: Replace string in SVG | |
| # if: success() | |
| # run: | | |
| # sed -i 's/58a6ff/F38CFE/g' github-metrics.svg | |
| - name: Commit changes | |
| if: success() | |
| run: | | |
| git config --local user.email "[email protected]" | |
| git config --local user.name "GitHub Action" | |
| if git diff --quiet; then | |
| echo "No changes to commit." | |
| else | |
| git commit -am "Update" | |
| fi | |
| - name: Push changes | |
| if: success() | |
| run: git push origin HEAD:master | |