Skip to content

Up to date

Up to date #12250

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Up to date
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ "*" ]
schedule:
- cron: '0 */3 * * *'
watch:
types: [ started ]
# 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"
build:
# The type of runner that the job will run on
runs-on: ubuntu-22.04
if: github.event_name != 'watch' || github.actor == github.event.repository.owner.login
# 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@v3
with:
submodules: true
fetch-depth: 0
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Install dependencies
run: |
set -x
python -m pip install --upgrade pip
pip install -r requirements.txt
# sudo apt-get purge grub\*
sudo apt-mark hold grub-efi-amd64-signed
sudo ACCEPT_EULA=Y apt-get update -y
sudo ACCEPT_EULA=Y apt-get upgrade -y # -o Dpkg::Options::="--force-overwrite"
sudo ACCEPT_EULA=Y apt-get install -y npm
sudo npm install -g electron@6.1.4 --unsafe-perm=true --allow-root orca
- name: Update data
run: |
cd COVID-19
git checkout master
git pull origin master
# Runs a set of commands using the runners shell
- name: Generate output file
run: |
python ./src/generate.py
- name: Commit back to the repo
run: |
git config --global user.email "github-action@example.com"
git config --global user.name "Github Action"
git remote add github "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git"
git pull github "$GITHUB_REF" --ff-only
if ! git diff --cached --exit-code; then
exit 0
fi
git add COVID-19
git add italy-czechia_time_zero_comparison.ipynb
git commit -m "Add new autogenerated version"
git push github "HEAD:$GITHUB_REF"