We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6940aee + 828a0d4 commit d102b27Copy full SHA for d102b27
.github/workflows/update-date.yml
@@ -0,0 +1,29 @@
1
+name: Update Date in README
2
+
3
+on:
4
+ schedule:
5
+ - cron: "0 0 * * *" # Runs daily at midnight UTC
6
+ workflow_dispatch: # Allows manual triggering
7
8
+jobs:
9
+ update-date:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - name: Checkout repo
13
+ uses: actions/checkout@v4
14
15
+ - name: Update date in README.md
16
+ run: |
17
+ # Get current date (customize format below)
18
+ CURRENT_DATE=$(date +'%Y-%m-%d')
19
20
+ # Replace placeholder with the current date
21
+ sed -i "s/<!-- DATE -->/${CURRENT_DATE}/g" README.md
22
23
+ - name: Commit and push changes
24
25
+ git config user.name "github-actions"
26
+ git config user.email "[email protected]"
27
+ git add README.md
28
+ git commit -m "Update date in README" || echo "No changes to commit"
29
+ git push
0 commit comments