From ddcbd1a713fcd5348dd7fe6f1a3b844cea184898 Mon Sep 17 00:00:00 2001 From: Oleksandr Dievri Date: Sun, 10 Jan 2021 15:40:10 +0200 Subject: [PATCH] Switch to cron job #48 --- .github/workflows/download.yaml | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/.github/workflows/download.yaml b/.github/workflows/download.yaml index 2574815b..f8a918d3 100644 --- a/.github/workflows/download.yaml +++ b/.github/workflows/download.yaml @@ -1,20 +1,23 @@ # This workflow containts jobs for downloading player data name: Player Data Downloader on: - workflow_dispatch: - inputs: - first_id: - description: 'First Player ID' - required: false - default: 30000 - last_id: - description: 'Last Player ID' - required: false - default: 30100 - threads: - description: 'Number of Execution Threads' - required: false - default: 10 + schedule: + # * is a special character in YAML so you have to quote this string + - cron: '*/5 * * * *' + # workflow_dispatch: + # inputs: + # first_id: + # description: 'First Player ID' + # required: false + # default: 30000 + # last_id: + # description: 'Last Player ID' + # required: false + # default: 30100 + # threads: + # description: 'Number of Execution Threads' + # required: false + # default: 10 jobs: download: @@ -49,7 +52,7 @@ jobs: # Run Player Data Downloader with inputs provided from dispatch if present # or run with defaults and save into data directory - name: Download Data - run: java -Dlog4j.configurationFile=log4j2.xml -cp kgparserSrv/target/kgparser-srv-1.0.jar ru.klavogonki.kgparser.PlayerDataDownloader data ${{ github.event.inputs.first_id }} ${{ github.event.inputs.last_id }} ${{ github.event.inputs.threads }} + run: java -Dlog4j.configurationFile=log4j2.xml -cp kgparserSrv/target/kgparser-srv-1.0.jar ru.klavogonki.kgparser.PlayerDataDownloader data 30000 30100 10 # Archive all downloaded .json files - name: Archive Data