Update README.md #8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - name: Commit and push daily update | ||
| run: | | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||
| # Create file if missing | ||
| if [ ! -f daily_update.txt ]; then | ||
| echo "File not found. Creating new daily_update.txt..." | ||
| echo "Last updated: $(date)" > daily_update.txt | ||
| fi | ||
| # Update file with today's date | ||
| echo "Last updated: $(date)" > daily_update.txt | ||
| # Commit and push changes | ||
| if [[ `git status --porcelain` ]]; then | ||
| git add daily_update.txt | ||
| git commit -m "⏰ Auto update: $(date)" | ||
| git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git HEAD:${{ github.ref }} | ||
| else | ||
| echo "No changes to commit" | ||
| fi | ||