79 lines (74 loc) · 2.79 KB
/
python-app.yml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python application
on:
schedule: [{cron: "0 */5 * * *"}]
# Lines below let you run workflow manually and on each commit
workflow_dispatch:
push: {branches: ["master", "main"]}
jobs:
github-metrics:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: lowlighter/metrics@latest
with:
# Your GitHub token
# The following scopes are required:
# - public_access (default scope)
# The following additional scopes may be required:
# - read:org (for organization related metrics)
# - read:user (for user related data)
# - read:packages (for some packages related data)
# - repo (optional, if you want to include private repositories)
token: ${{ secrets.METRICS_TOKEN }}
# Options
user: rafnixg
template: classic
base: header, activity, community, repositories, metadata
config_timezone: America/Lima
plugin_achievements: yes
plugin_achievements_display: detailed
plugin_achievements_secrets: yes
plugin_achievements_threshold: C
plugin_gists: yes
plugin_habits: yes
plugin_habits_charts_type: classic
plugin_habits_days: 14
plugin_habits_facts: yes
plugin_habits_from: 200
plugin_habits_languages_limit: 8
plugin_habits_languages_threshold: 0%
plugin_posts: yes
plugin_posts_covers: yes
plugin_posts_limit: 6
plugin_posts_source: dev.to
plugin_posts_user: rafnixg
plugin_repositories: yes
plugin_repositories_order: featured, pinned, starred, random
plugin_starlists: yes
plugin_starlists_limit: 2
plugin_starlists_limit_languages: 8
plugin_starlists_limit_repositories: 2
plugin_starlists_shuffle_repositories: yes
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run script
run: |
python app.py
git config user.name rafnixg
git config user.email rafnixg@gmail.com
git add README.md
git diff --quiet && git diff --staged --quiet || git commit -m "[BOT] Update README with latest info"
git push origin master