-
Notifications
You must be signed in to change notification settings - Fork 5
54 lines (46 loc) · 1.56 KB
/
main.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
on:
push:
schedule:
- cron: '0 2 * * *'
workflow_dispatch:
jobs:
mathlib_stats:
if: github.event.pusher.name != 'leanprover-community-bot'
runs-on: ubuntu-latest
name: Generate statistics about the mathlib repo
steps:
- name: Checkout scripts
uses: actions/checkout@v4
- name: Checkout mathlib
run: git clone https://github.com/leanprover-community/mathlib
- name: Checkout mathlib4
run: git clone https://github.com/leanprover-community/mathlib4
- name: Checkout mathlib-mailmap
uses: actions/checkout@v4
with:
# this repo is private to prevent spambots from scraping email addresses
repository: leanprover-community/mathlib-mailmap
token: ${{ secrets.MAILMAP_GITHUB_TOKEN }}
path: mailmap
- name: install Python
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Run gitstats
run: |
cp mailmap/mailmap mathlib/.mailmap
cp mailmap/mailmap mathlib4/.mailmap
./gitstats.py mathlib docs
./gitstats.py mathlib4 docs4
cp docs4/gitstats.js docs/gitstats4.js
- name: push results
# push results when we push to master
if: github.repository == 'leanprover-community/mathlib_stats' && github.ref == 'refs/heads/master'
uses: EndBug/add-and-commit@v9
with:
add: 'docs'
author_name: 'leanprover-community-bot'
author_email: '[email protected]'
message: 'Update gitstats'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}