-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (54 loc) · 1.91 KB
/
post-github-stats.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
name: Post - GitHub stats for activity tracking
on:
workflow_dispatch:
schedule:
- cron: "0 0 1,15 * *" # Every 1st & 15th of the month
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install pip packages
run: |
pip install python-graphql-client
pip install python-dateutil
pip install requests
pip install beautifulsoup4
working-directory: ${{ github.workspace }}
- name: Run script post-discord-message.py
if: github.event.schedule != '0 0 15 * *'
run: |
python Discord/post-discord-message.py
working-directory: ${{ github.workspace }}
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_GITHUBSTATS_WEBHOOK_URL }}
MESSAGE: "**MONTHLY REPORT** ..................\n\n "
BOT_NAME: "Github activity tracking"
EMBEDS_TITLE: ""
EMBEDS_URL: ""
EMBEDS_DESCRIPTION: ""
- name: Get download stats
if: github.event.schedule != '0 0 15 * *'
run: |
python GitHubStats/get_downloads.py
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_GITHUBSTATS_WEBHOOK_URL }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get cloner stats
run: |
python GitHubStats/get_cloners.py
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_GITHUBSTATS_WEBHOOK_URL }}
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
- name: Get GitHub stats - PR issues discussions
if: github.event.schedule != '0 0 15 * *'
run: |
python GitHubStats/get_repo_stats.py
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_GITHUBSTATS_WEBHOOK_URL }}
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}