Skip to content

Commit

Permalink
add snake & metrics workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Elevhate committed Sep 4, 2024
1 parent 9b10ff4 commit 3d033fc
Show file tree
Hide file tree
Showing 4 changed files with 169 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
81 changes: 81 additions & 0 deletions .github/workflows/metrics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: generate profile metrics

on:
workflow_dispatch:
push:
branches:
- main
schedule:
- cron: "0 */12 * * *"

jobs:
github-metrics:
runs-on: ubuntu-latest
steps:
- uses: lowlighter/metrics@latest
with:
token: ${{ secrets.METRICS_TOKEN }}

# Options
user: elevhate
template: classic
base: header, activity, community, metadata
config_timezone: Europe/Berlin
output_action: commit
committer_branch: metrics
committer_message: "📊 update metrics"
repositories_forks: yes

# Coding habits
plugin_habits: yes
plugin_habits_from: 1000
plugin_habits_days: 30
plugin_habits_facts: no
plugin_habits_charts: yes
plugin_habits_trim: no

# Isometric commit calendar
plugin_isocalendar: yes
plugin_isocalendar_duration: full-year

# Achievements
plugin_achievements: yes
plugin_achievements_display: compact
plugin_achievements_secrets: yes
plugin_achievements_threshold: C

# Languages
plugin_languages: yes
plugin_languages_analysis_timeout: 30
plugin_languages_categories: markup, programming
plugin_languages_colors: github
plugin_languages_details: percentage
plugin_languages_ignored: html, scss, arduino, kotlin, objective-c, css, twig
plugin_languages_limit: 8
plugin_languages_recent_categories: markup, programming
plugin_languages_recent_days: 365
plugin_languages_recent_load: 3000
plugin_languages_sections: most-used
plugin_languages_threshold: 0%

# Leetcode
plugin_leetcodeL: yes
plugin_leetcode_limit_skills: 10
plugin_leetcode_sections: solved, skills
plugin_leetcode_user: elevhate

# Steam
plugin_steam: no
plugin_steam_token: ${{ secrets.STEAM_API_TOKEN }}
plugin_steam_user: ${{ secrets.STEAM_ID }}
plugin_steam_achievements_limit: 3
plugin_steam_games_limit: 1
plugin_steam_playtime_threshold: 2
plugin_steam_recent_games_limit: 1
plugin_steam_sections: player, most-played, recently-played

# 16personalities
plugin_16personalities: no
plugin_16personalities_url: ${{ secrets.SIXTEEN_PERSONALITIES_URL }}
plugin_16personalities_sections: personality, profile, traits
plugin_16personalities_scores: yes
71 changes: 71 additions & 0 deletions .github/workflows/snake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: generate snake animation

on:
workflow_dispatch:
push:
branches:
- main
schedule:
- cron: "0 */12 * * *" # every 12 hours

jobs:
generate:
permissions:
contents: write
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Set current month as environment variable
run: echo "MONTH=$(date +'%m')" >> $GITHUB_ENV

# winter theme
- name: generate github-contribution-grid-snake.svg
if: github.event.schedule == '0 */12 * 12,1,2 *' || ((github.event_name == 'push' || github.event_name == 'workflow_dispatch') && contains('12 01 02', env.MONTH))
uses: Platane/snk/svg-only@v3
with:
github_user_name: ${{ github.repository_owner }}
outputs: |
dist/github-contribution-grid-snake.svg?color_snake=#66ec48&color_dots=#a3c4d4,#b3e5fc,#4fc3f7,#039be5,#01579b
dist/github-contribution-grid-snake-dark.svg?color_snake=#66ec48&color_dots=#27363d,#b3e5fc,#4fc3f7,#039be5,#01579b
# spring theme
- name: generate github-contribution-grid-snake.svg
if: github.event.schedule == '0 */12 * 3,4,5 *' || ((github.event_name == 'push' || github.event_name == 'workflow_dispatch') && contains('03 04 05', env.MONTH))
uses: Platane/snk/svg-only@v3
with:
github_user_name: ${{ github.repository_owner }}
outputs: |
dist/github-contribution-grid-snake.svg?color_snake=#66ec48&color_dots=#a3c4d4,#f8bbd0,#f06292,#e91e63,#880e4f
dist/github-contribution-grid-snake-dark.svg?color_snake=#66ec48&color_dots=#27363d,#f8bbd0,#f06292,#e91e63,#880e4f
# summer theme
- name: generate github-contribution-grid-snake.svg
if: github.event.schedule == '0 */12 * 6,7,8 *' || ((github.event_name == 'push' || github.event_name == 'workflow_dispatch') && contains('06 07 08', env.MONTH))
uses: Platane/snk/svg-only@v3
with:
github_user_name: ${{ github.repository_owner }}
outputs: |
dist/github-contribution-grid-snake.svg?color_snake=#66ec48&color_dots=#a3c4d4,#ffecb3,#ffd54f,#ffb300,#ff6f00
dist/github-contribution-grid-snake-dark.svg?color_snake=#66ec48&color_dots=#27363d,#ffecb3,#ffd54f,#ffb300,#ff6f00
# autumn theme
- name: generate github-contribution-grid-snake.svg
if: github.event.schedule == '0 */12 * 9,10,11 *' || ((github.event_name == 'push' || github.event_name == 'workflow_dispatch') && contains('09 10 11', env.MONTH))
uses: Platane/snk/svg-only@v3
with:
github_user_name: ${{ github.repository_owner }}
outputs: |
dist/github-contribution-grid-snake.svg?color_snake=#66ec48&color_dots=#a3c4d4,#fdf156,#ff6f01,#fd2f24,#811d5e
dist/github-contribution-grid-snake-dark.svg?color_snake=#66ec48&color_dots=#27363d,#fdf156,#ff6f01,#fd2f24,#811d5e
# push the content of <build_dir> to a branch
# the content will be available at https://raw.githubusercontent.com/<github_user>/<repository>/<target_branch>/<file> , or as github page
- name: push github-contribution-grid-snake.svg to the output branch
uses: crazy-max/[email protected]
with:
build_dir: dist
commit_message: "👾 update sneek"
target_branch: snk
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,22 @@
[![Instagram](https://img.shields.io/badge/Instagram-%23E4405F.svg?logo=Instagram&logoColor=white)](https://instagram.com/f.e.l.i.x.z)
[![Email](https://img.shields.io/badge/-Email-c14438?style=flat-square&logo=Gmail&logoColor=white&link=mailto:[email protected])](mailto:[email protected])
[![Linkedin](https://img.shields.io/badge/-LinkedIn-blue?style=flat-square&logo=Linkedin&logoColor=white&link=https://www.linkedin.com/in/felix-zorn/)](https://www.linkedin.com/in/felix-zorn/)
[![Twitter](https://img.shields.io/badge/Twitter-%231DA1F2.svg?logo=Twitter&logoColor=white)](https://twitter.com/i_am_shexpyr)
![X (formerly Twitter) URL](https://img.shields.io/twitter/url?url=https%3A%2F%2Fx.com%2Felevhate)
[![Medium](https://img.shields.io/badge/Medium-12100E?logo=medium&logoColor=white)](https://medium.com/@elevhate)


![](https://komarev.com/ghpvc/?username=elevhate)
[![wakatime](https://wakatime.com/badge/user/ad70fdc4-0867-45be-8b1f-e921acf3fdcb.svg)](https://wakatime.com/@ad70fdc4-0867-45be-8b1f-e921acf3fdcb)

<div align="center" style="width:652px;">
<picture style="width:652px;">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/elevhate/elevhate/snk/github-contribution-grid-snake-dark.svg">
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/elevhate/elevhate/snk/github-contribution-grid-snake.svg">
<img src="https://raw.githubusercontent.com/elevhate/elevhate/snk/github-contribution-grid-snake.svg" width="652px" alt="Snake">
</picture>
<hr width="652px" />
</div>

# 💻 Tech Stack:
<div >
<code><img width="50" src="https://user-images.githubusercontent.com/25181517/192149581-88194d20-1a37-4be8-8801-5dc0017ffbbe.png" alt="Go" title="Go"/></code>
Expand Down

0 comments on commit 3d033fc

Please sign in to comment.