Updaing download count #135
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: Update README Download Count | |
| run-name: Updaing download count | |
| on: | |
| schedule: | |
| - cron: "0 12 * * 6" | |
| workflow_dispatch: | |
| jobs: | |
| update: | |
| name: Update download count | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v2.3.2 | |
| with: | |
| token: ${{ secrets.GIT_ACCESS_TOKEN }} | |
| - name: Modifiy the specific files using scripts | |
| run: | | |
| DL=`curl "https://releases.obsidian.md/stats/theme" | jq '."Everforest Enchanted".download' | xargs numfmt --grouping` | |
| echo "Updaing downloads to '$DL'" | |
| sed -i "/^\!\[Static Badge\]/c" README.md | |
| echo "Email is ommitted on purpose!" | |
| git config --global user.name "GitHub Workflow" | |
| git config --global user.email "" | |
| git add -A | |
| git commit -m "chore: Update download count" | |
| git push |