..
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48 | name: Metrics
on:
# Schedule hourly updates
schedule:
# Runs "at minute 55 past every hour" (see https://crontab.guru)
- cron: '0 * * * *'
# (optional) Run workflow when pushing on master/main
push: {branches: ["master", "main"]}
jobs:
generate-snake-contribution-graph:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
# Clone the repository with all its history
fetch-depth: 0
- uses: Platane/snk@v2
with:
# github user name to read the contribution graph from (**required**)
# using action context var `github.repository_owner` or specified user
github_user_name: ${{ github.repository_owner }}
# list of files to generate.
# one file per line. Each output can be customized with options as query string.
#
# supported options:
# - palette: A preset of color, one of [github, github-dark, github-light]
# - color_snake: Color of the snake
# - color_dots: Coma separated list of dots color.
# The first one is 0 contribution, then it goes from the low contribution to the highest.
# Exactly 5 colors are expected.
outputs: |
images/snake/github-snake.svg
images/snake/github-snake-dark.svg?palette=github-dark
images/snake/ocean.svg?color_snake=orange&color_dots=#bfd6f6,#8dbdff,#64a1f4,#4b91f1,#3c7dd9
# add a last updated message to README.md after deleting the previous one
- run: |
sed '$ d' README.md > README.md.tmp
echo "Last updated: $(date)" >> README.md.tmp
mv README.md.tmp README.md
# push the generated files to the repository
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update snake
commit_options: "--signoff"
file_pattern: images/snake
|
|