Cronjob #50115
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: "Cronjob" | |
on: | |
schedule: | |
- cron: '*/5 * * * *' | |
push: | |
branches: | |
- 'main' | |
jobs: | |
update-weather: | |
permissions: write-all | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Generate README | |
uses: ePlus-DEV/weather-forecast@v1.0.8 | |
with: | |
city: 'Ho Chi Minh City' | |
days: 7 | |
weather-api-key: ${{ secrets.WEATHER_API_KEY }} | |
template-file: 'README.md.template' | |
out-file: 'README.md' | |
- name: Commit | |
run: | | |
git config user.name "David Nguyen" | |
git config user.email h250694@gmail.com | |
git add . | |
git commit -m "update weather Ho Chi Minh ☁️🌤️⛈️🌩️🌧️ ($(TZ="Asia/Ho_Chi_Minh" date +'%Y-%m-%d %H:%M:%S'))" | |
git push origin main |