-
Notifications
You must be signed in to change notification settings - Fork 43
37 lines (29 loc) · 1.04 KB
/
discord-fetch.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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