2024-10-04 10:54:51 +00:00
|
|
|
name: Retrieve Events Datas
|
|
|
|
run-name: Retrieve Events Datas
|
2024-10-04 11:08:06 +00:00
|
|
|
on:
|
|
|
|
schedule:
|
2024-10-04 19:11:27 +00:00
|
|
|
- cron: "0 2 * * *"
|
2024-10-04 11:08:06 +00:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2024-10-04 10:54:51 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
Retrieve-Events-Datas:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Check out repository code
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Use Node.js 20.x
|
|
|
|
uses: actions/setup-node@v4
|
|
|
|
with:
|
|
|
|
node-version: "20.x"
|
|
|
|
- run: npm ci
|
|
|
|
- run: npm run retrieve-datas
|
2024-10-04 11:18:32 +00:00
|
|
|
env:
|
|
|
|
DISCORD_BOT_TOKEN: ${{ secrets.DISCORD_BOT_TOKEN }}
|
|
|
|
DISCORD_GUILD_ID: ${{ secrets.DISCORD_GUILD_ID }}
|
2024-10-04 11:26:13 +00:00
|
|
|
- run: git fetch --all
|
|
|
|
- run: git pull
|
|
|
|
- run: git add events.json
|
|
|
|
- run: git config --global user.email "cameliastudio@localhost"
|
2024-10-21 09:20:40 +00:00
|
|
|
- run: git config --global user.name "[Bot] Camelia Studio"
|
2024-10-04 11:26:13 +00:00
|
|
|
- run: git commit -m "Update events datas" --allow-empty
|
|
|
|
- run: git checkout -b datas
|
|
|
|
- run: git push -u origin datas --force
|