Skip to content

Monday Fights Downloader #106

Monday Fights Downloader

Monday Fights Downloader #106

name: Monday Fights Downloader
on:
workflow_dispatch:
schedule:
- cron: '40 20 * * MON' # UTC time ten minutes after Monday Fight (summer time is UTC+2 and should contain 40 19 * * MON while winter 40 20 * * MON)
jobs:
echo-input:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 19
- name: Use token
env:
TOKEN: ${{ secrets.MONDAY_FIGHTS_TOKEN }} # we need personal token because default GITHUB_TOKEN never triggers new events so pages would not be rebuilt
run: |
# Download Monday Fights
cd Scripts
node downloadMF.mjs
git config --global user.name 'Bebul BOT'
git config --global user.email 'Bebul@users.noreply.github.com'
if git diff --exit-code --quiet; then
echo Up to date, nothing to commit!
else
git commit -am "Regular Monday Fights tournament download"
git push
fi