Skip to content
This repository has been archived by the owner on Aug 15, 2023. It is now read-only.

Update data from CSSEGISandData #29007

Update data from CSSEGISandData

Update data from CSSEGISandData #29007

Workflow file for this run

name: Update data from CSSEGISandData
on:
push:
schedule:
- cron: '0 * * * *'
jobs:
clone-source:
runs-on: ubuntu-latest
steps:
- name: Clone source
uses: actions/checkout@v2
with:
repository: 'CSSEGISandData/COVID-19'
- name: Copy files
run: |
mkdir csv
mv csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_global.csv csv/confirmed.csv
mv csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_deaths_global.csv csv/deaths.csv
mv csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_recovered_global.csv csv/recovered.csv
- name: Upload files
uses: actions/upload-artifact@v1
with:
name: csv
path: csv
clone-source-it:
runs-on: ubuntu-latest
steps:
- name: Clone source Italy
uses: actions/checkout@v2
with:
repository: 'pcm-dpc/COVID-19'
- name: Copy files
run: |
mkdir json
mv dati-json/dpc-covid19-ita-andamento-nazionale.json json/italy.json
mv dati-json/dpc-covid19-ita-regioni.json json/regioni.json
mv dati-json/dpc-covid19-ita-province.json json/province.json
- name: Upload files
uses: actions/upload-artifact@v1
with:
name: json
path: json
update-data:
needs: clone-source
runs-on: ubuntu-latest
steps:
- name: Clone our repo
uses: actions/checkout@v2
with:
repository: 'enrichman/covid19'
ref: 'master'
- name: Download files
uses: actions/download-artifact@v1
with:
name: csv
path: csv
- name: Download files IT
uses: actions/download-artifact@v1
with:
name: json
path: json
- name: Generate new files
run: |
go build .
./covid19
rm covid19
- name: Push on our repo
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add -A
git diff-index --quiet HEAD || git commit -m 'Update data'
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master
- name: Upload files
uses: actions/upload-artifact@v1
with:
name: world
path: world
- name: Upload files IT
uses: actions/upload-artifact@v1
with:
name: local
path: local
create-site:
needs: update-data
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.ENRICHMAN_GH_TOKEN }}
repository: 'enrichman/enrichman.github.io'
- name: Download files
uses: actions/download-artifact@v1
with:
name: world
path: covid19/world
- name: Download files IT
uses: actions/download-artifact@v1
with:
name: local
path: covid19/local
- name: Run a multi-line script
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add covid19
git diff-index --quiet HEAD || git commit -m 'Update world data'
- uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.ENRICHMAN_GH_TOKEN }}
repository: 'enrichman/enrichman.github.io'