Skip to content

GET_COVID-19_ISS_open_data #1389

GET_COVID-19_ISS_open_data

GET_COVID-19_ISS_open_data #1389

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: GET_COVID-19_ISS_open_data
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
#push:
schedule:
- cron: "30 22 * * 0-6"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
get_data:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Runs a set of commands using the runners shell
- name: Run a multi-line script
run: |
wget -P /tmp --cipher 'DEFAULT:!DH' https://www.epicentro.iss.it/coronavirus/open-data/covid_19-iss.xlsx
TIMESTAMP=$(date --iso-8601=seconds)
ISSFILENAME="covid_19-iss_$TIMESTAMP.xlsx"
mkdir -p "$GITHUB_WORKSPACE/data/sources/ISS/"
mv /tmp/covid_19-iss.xlsx "$GITHUB_WORKSPACE/data/sources/ISS/$ISSFILENAME"
git config user.name "TDBot"
git config user.email "actions@users.noreply.github.com"
git add "data/sources/ISS/$ISSFILENAME"
git commit -m "ISS open data update $TIMESTAMP" || exit 0
git push