Skip to content

Commit 03bffb6

Browse files
authored
Update and rename daily-commit-link-tracker.yml to dailyCommitUpdate.yml
1 parent de0f7a0 commit 03bffb6

File tree

2 files changed

+37
-41
lines changed

2 files changed

+37
-41
lines changed

.github/workflows/daily-commit-link-tracker.yml

-41
This file was deleted.
+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Daily Commit and Solution Update
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
schedule:
8+
- cron: '0 22 * * *' # Runs once a day at 10 PM UTC
9+
workflow_dispatch:
10+
11+
jobs:
12+
update-solution:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout Repository
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: 3.8
23+
24+
- name: Install Dependencies
25+
run: pip install requests
26+
27+
- name: Get Latest Commit and Update Solution
28+
run: python src/update_solution.py ${{ github.repository_owner }} ${{ secrets.GITHUB_TOKEN }} README.md
29+
30+
- name: Commit and Push Changes
31+
run: |
32+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
33+
git config --local user.name "github-actions[bot]"
34+
git add -A
35+
git diff-index --quiet HEAD || git commit -m "Update today's solution"
36+
git push
37+

0 commit comments

Comments
 (0)