Skip to content

Commit ffcf772

Browse files
committed
add repository statistics workflow for automated metrics collection
correct run-name in repository statistics workflow add push trigger for action/repo-stats branch in repository statistics workflow refactor: move permissions section to top and update token reference in repo-stats workflow fix: update run-name formatting and remove push trigger from repository statistics workflow
1 parent beb1af1 commit ffcf772

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

.github/workflows/repo-stats.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Repository Statistics
2+
run-name: 📊 Collect Repository Metrics
3+
4+
on:
5+
schedule:
6+
# Runs every 2nd day at 02:00 UTC (less busy time)
7+
- cron: '0 2 */2 * *'
8+
workflow_dispatch: # Allow manual trigger for testing
9+
10+
permissions:
11+
contents: write # Needed to write stats data
12+
pull-requests: read
13+
issues: read
14+
15+
jobs:
16+
repo-stats:
17+
name: Generate Repository Statistics
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
24+
- name: Generate repository statistics
25+
uses: jgehrcke/github-repo-stats@RELEASE
26+
with:
27+
repository: ${{ github.repository }}
28+
ghtoken: ${{ secrets.REPO_STATS_TOKEN }} # Use custom PAT instead
29+
databranch: stats-data

0 commit comments

Comments
 (0)