Update Visitor Count Badge #1961
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 Visitor Count Badge | |
on: | |
schedule: | |
- cron: '0 * * * *' # Update every hour | |
jobs: | |
update_badge: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Update README | |
run: | | |
sed -i "s#\[Visitor Count\](.*#\[Visitor Count\]($(curl -s https://api.github.com/repos/ValAug/quicksight_with_terraform | jq -r .watchers_count)))#" README.md | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git commit -am "Update visitor count badge [skip ci]" || exit 0 | |
git push |