-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (45 loc) · 1.28 KB
/
update-activity.yaml
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
name: Update GitHub Activity
on:
workflow_dispatch:
inputs:
commit-results:
type: boolean
required: false
default: true
description: |
If true, the edited github-activity.csv file will be committed to the repository.
schedule:
# Run at 00:00 UTC MON-FRI
- cron: "0 0 * * 1-5"
env:
TERM: xterm
jobs:
update-github-activity:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Run script to fetch data
run: |
python get-data.py
env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
- name: Add and Commit updated CSV file
if: |
github.event_name == 'schedule' ||
(github.event_name == 'workflow_dispatch' &&
github.event.inputs.commit-results == 'true')
uses: EndBug/add-and-commit@v9
with:
add: github-activity.csv
message: "Update the GitHub Activity CSV file"