This repository has been archived by the owner on Aug 9, 2023. It is now read-only.
Update download counts #2735
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 download counts | |
on: | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
- cron: '0 */6 * * *' | |
workflow_dispatch: | |
jobs: | |
update-counts: | |
if: github.repository == 'goatcorp/DalamudPlugins' | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Extract branch name | |
shell: bash | |
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | |
id: extract_branch | |
- uses: actions/checkout@v1 | |
- name: Update download counts | |
run: | | |
wget -O downloadcounts.json https://kamori.goats.dev/Plugin/DownloadCounts | |
- name: Commit files | |
continue-on-error: true | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add . | |
git commit -m "Update download counts" | |
- name: Push changes | |
continue-on-error: true | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ steps.extract_branch.outputs.branch }} |