-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (41 loc) · 1.66 KB
/
Copy pathupdate-dashboard.yml
File metadata and controls
49 lines (41 loc) · 1.66 KB
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
name: Update Dashboard
on:
schedule:
# Runs daily at midnight UTC
- cron: '0 0 * * *'
workflow_dispatch:
# Allows manual triggering from the GitHub Actions tab
jobs:
update:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Dashboard Repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Clone Sibling Repositories
run: |
git clone https://github.com/LorranSutter/advent-of-code.git ../advent-of-code
git clone https://github.com/LorranSutter/everybody-codes.git ../everybody-codes
git clone https://github.com/LorranSutter/flip-flop-codes.git ../flip-flop-codes
git clone https://github.com/LorranSutter/leet-code.git ../leet-code
git clone https://github.com/LorranSutter/URI-Online-Judge.git ../URI-Online-Judge
- name: Generate Dashboard README
run: python3 generate_dashboard.py
- name: Commit and Push Changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
if [ -n "$(git status --porcelain README.md)" ]; then
git add README.md
git commit -m "chore: update progress statistics [skip ci]"
git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
else
echo "No progress updates detected. Skipping commit."
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}