@@ -12,26 +12,25 @@ jobs:
1212 - name : Check out repository
1313 uses : actions/checkout@v4
1414
15+ # Optional but helpful: Add this step to list files for debugging
16+ - name : List files in the directory
17+ run : ls -la
18+
1519 - name : Update date in README
1620 run : |
17- # This command finds the pattern like "[2025 Latest Project]" and replaces it.
18- # The regular expression looks for:
19- # \[ - A literal opening square bracket
20- # .* - Any characters (like a previous date or year)
21- # Latest Project\] - The literal text "Latest Project]"
22- # It replaces this with the current date in the format "[d Mon YYYY Latest Project]".
23- sed -i "s/\[.*Latest Project\]/\[$(date +'%d %b %Y') Latest Project\]/" README.md
21+ # Corrected to use "Readme.md" (with a capital R)
22+ sed -i "s/\[.*Latest Project\]/\[$(date +'%d %b %Y') Latest Project\]/" Readme.md
2423
2524 - name : Commit and push if changed
2625 run : |
27- # Check if the README .md file has been modified
28- if ! git diff --quiet README .md; then
29- echo "README .md has been updated. Committing changes."
26+ # Corrected to use "Readme .md" in the git diff and add commands
27+ if ! git diff --quiet Readme .md; then
28+ echo "Readme .md has been updated. Committing changes."
3029 git config --global user.name 'github-actions[bot]'
3130 git config --global user.email 'github-actions[bot]@users.noreply.github.com'
32- git add README .md
31+ git add Readme .md
3332 git commit -m "docs: Updated Project List"
3433 git push
3534 else
36- echo "No changes to commit. README is up-to-date."
35+ echo "No changes to commit. Readme.md is up-to-date."
3736 fi
0 commit comments