Update README with Random Quote #5
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: "Update README with Random Quote" | |
on: | |
schedule: | |
- cron: "0 0 * * *" # Run daily at midnight (UTC) | |
workflow_dispatch: # Manual trigger | |
jobs: | |
update-readme: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Docker | |
uses: docker/setup-buildx-action@v2 | |
- name: Build and run the action | |
uses: ./ | |
with: | |
quotes_file: "data/quotes.json" | |
readme_file: "README.md" | |
- name: Commit changes | |
run: | | |
git config --global user.name "github-actions" | |
git config --global user.email "github-actions@github.com" | |
git add README.md | |
git commit -m "Update README with random quote" || echo "No changes to commit" | |
git push |