Update README.md #43
This file contains 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: CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: # ๅ ่ฎธๆๅจ่งฆๅๅทฅไฝๆต | |
schedule: | |
- cron: "30 23 * * *" # ๆฏๅคฉ 23:30 ่งฆๅไธๆฌก | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Create timestamped .md file | |
run: | | |
timestamp=$(date "+%Y-%m-%d %H:%M:%S") | |
echo "Last update time: $timestamp" > "DATA_UPDATE.md" | |
- name: Commit and push .md file | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git add DATA_UPDATE.md | |
if git diff --cached --quiet; then | |
echo "No changes to commit" | |
else | |
git commit -m "Update DATA_UPDATE.md with timestamp $(date '+%Y-%m-%d %H:%M:%S')" | |
git push origin main | |
fi |