-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (63 loc) · 2.79 KB
/
stats.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
54
55
56
57
58
59
60
61
62
63
64
65
66
on:
schedule:
# Run this once per day, towards the end of the day for keeping the most
# recent data point most meaningful (hours are interpreted in UTC).
- cron: "0 22 * * *"
workflow_dispatch:
jobs:
j1:
name: repo-stats-for-traffic
runs-on: ubuntu-latest
steps:
- name: run-ghrs
uses: jgehrcke/github-repo-stats@RELEASE
with:
ghtoken: ${{ secrets.REPO_STATS }}
databranch: repo_stats
run-ghrs-with-matrix:
name: repo-stats-for-subrepos
needs: j1
runs-on: ubuntu-latest
strategy:
matrix:
# The repositories to generate reports for.
statsRepo: [ 'craciunoiuc/acs-homework-index' ]
# statsRepo: ['craciunoiuc/numericalmethods', 'craciunoiuc/computerprogramming', 'craciunoiuc/datastructures',
# 'craciunoiuc/oop-homework', 'craciunoiuc/assembly', 'craciunoiuc/network-protocols',
# 'craciunoiuc/programming-paradigms', 'craciunoiuc/algorithmanalysis', 'craciunoiuc/algorithm-design',
# 'craciunoiuc/Halite-III', 'craciunoiuc/parallel-algorithms', 'craciunoiuc/computer-graphics',
# 'craciunoiuc/operating-systems', 'craciunoiuc/computer-architecture', 'craciunoiuc/parallel-architectures',
# 'craciunoiuc/multiprocessor-structures', 'craciunoiuc/computer-graphics-2', 'craciunoiuc/vlsi',
# 'craciunoiuc/SO2', 'craciunoiuc/SIS', 'craciunoiuc/CNS',
# 'craciunoiuc/IQC-lab-presentation', 'SMD-UPB/lab_8-10_ionut-craciunoiuc', 'SMD-UPB/lab_8-10_project_ionut-craciunoiuc',
# 'craciunoiuc/AC', 'gabrielmocanu/cloud-computing-project' ]
# Do not cancel&fail all remaining jobs upon first job failure.
fail-fast: false
# Help avoid commit conflicts. Note(JP): this should not be
# necessary anymore, feedback appreciated
max-parallel: 1
steps:
- name: run-ghrs
uses: jgehrcke/github-repo-stats@RELEASE
with:
repository: ${{ matrix.statsRepo }}
ghtoken: ${{ secrets.REPO_STATS }}
databranch: repo_stats
squash-all-new-commits:
name: squash-new-commits
if: ${{ always() }}
needs: [j1, run-ghrs-with-matrix]
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
ref: 'repo_stats'
- name: Clone & Move to stats branch
run: |
# git reset --soft $(git log --date=format:'%Y-%m-%d %H:%M:%S' | grep -B 2 $(date --date="yesterday" '+%F') | head -1 | cut -d' ' -f2-)
git reset --soft HEAD~6
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
git commit -s -m "Add statistics for $(date '+%F')"
git push