.github/workflows/discord-fetch.yml #27491
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
on: | |
schedule: | |
- cron: '0 1-23 * * *' | |
jobs: | |
discord-fetch: | |
if: github.repository == 'sirjonasxx/G-ExtensionStore' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 16.6.1 | |
- run: npm install | |
- name: fetch extension ratings from discord | |
run: npm run discord:fetch | |
env: | |
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }} | |
- name: re-generate .auto-generated folder | |
run: npm run auto-generate | |
- run: | | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git add ./.auto-generated/* ./store/ratings.json | |
git commit -m "Generate ratings & update .auto-generated/ folder" || true | |
- name: Push changes # push the output folder to your repo | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
force: true |