Skip to content

Commit 6f58959

Browse files
authored
Update and rename update_readme.yml to daily-commit-link.yml
1 parent 40b6ae4 commit 6f58959

File tree

2 files changed

+35
-35
lines changed

2 files changed

+35
-35
lines changed
+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Daily Commit Link and POTD Badge Tracker
2+
3+
on:
4+
push:
5+
branches:
6+
- main # or your default branch name
7+
schedule:
8+
- cron: '0 0 * * *' # This will run daily at midnight UTC
9+
workflow_dispatch:
10+
11+
jobs:
12+
update-link:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Setup Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: 3.8
22+
23+
- name: Install requests
24+
run: pip install requests
25+
26+
- name: Update README with the Latest Commit
27+
run: python update_commit.py ${{ github.repository }} ${{ secrets.GITHUB_TOKEN }} README.md
28+
29+
- name: Commit and Push Changes
30+
run: |
31+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
32+
git config --local user.name "github-actions[bot]"
33+
git add README.md
34+
git diff-index --quiet HEAD || git commit -m "Update latest commit and POTD badge"
35+
git push

.github/workflows/update_readme.yml

-35
This file was deleted.

0 commit comments

Comments
 (0)