-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (29 loc) · 990 Bytes
/
update-github-activity.yml
File metadata and controls
35 lines (29 loc) · 990 Bytes
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
name: Update GitHub Activity
on:
schedule:
- cron: '0 0 * * *' # Daily at 00:00 UTC
workflow_dispatch: # Allows manual triggering
jobs:
update-data:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Fetch GitHub Data
run: bun run data:fetch-github
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Commit and Push changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add data/github-activity.json
git diff --quiet && git diff --staged --quiet || (git commit -m "[CHORE] Update GitHub Activity data [skip ci]" && git push)