forked from sofa-framework/sofa
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (47 loc) · 1.64 KB
/
post_discussions_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
name: Post GitHub Discussions Statistics
on:
workflow_dispatch:
schedule:
- cron: '0 7 * * 1' # Every Monday at 7:00 AM UTC (9:00 AM CET)
pull_request:
types:
- opened
- synchronize
- labeled
- unlabeled
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10' # Use the desired Python version
- name: Install dependencies
run: |
pip install python-graphql-client
pip install python-dateutil
working-directory: ${{ github.workspace }}
- name: Run script get-weekly-discussions-stats.py
id: create_message
run: |
echo "::set-output name=output_var::$(python scripts/get-weekly-discussions-stats.py)"
working-directory: ${{ github.workspace }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Send message to SOFA channel using Cake
uses: cake-build/cake-action@v1
with:
script-path: scripts/send-gitter-message.cake
env:
Gitter_token: "syt_c29mYWJvdC01YTg0MDU0OGQ3MzQwOGNlNGY4ZDE1Njk_SjdArMIDLUbnoqPigtAS_2QBfb0"
Gitter_message: ${{ steps.create_message.outputs.output_var }}
# - name: Send message to SOFA channel
# uses: fadenb/[email protected]
# with:
# homeserver: 'https://gitter.ems.host/'
# token: ${{ secrets.MATRIX_TOKEN }}
# channel: '!XWVzIQpwOMjHkyTsNE:gitter.im'
# message: ${{ steps.create_message.outputs.output_var }}