This commit is contained in:
Hamel Husain 2021-02-13 20:28:24 -08:00 коммит произвёл GitHub
Родитель cde417d1eb
Коммит 836eceb81f
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 1 добавлений и 28 удалений

29
.github/workflows/update-nb.yaml поставляемый
Просмотреть файл

@ -2,12 +2,10 @@ name: Update Notebooks And Refresh Page
on:
schedule:
- cron: '0 */6 * * *'
issues:
types: [opened]
workflow_dispatch:
jobs:
update-notebooks:
if: (github.event_name == 'schedule' || (github.event.issue.title == '[dashboard] Refresh Notebooks' && github.actor == 'hamelsmu' && github.event_name == 'issues')) && github.repository == 'github/covid19-dashboard'
runs-on: ubuntu-latest
steps:
@ -21,31 +19,9 @@ jobs:
actor: ${{ github.actor }}
event_name: ${{ github.event_name }}
- name: Comment With Link To Workflow On Issue
if: github.event_name == 'issues'
uses: actions/github-script@0.6.0
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
var run_id = process.env.RUN_ID;
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `Automated refresh of notebooks instantiated with run id [${run_id}](https://github.com/github/covid19-dashboard/actions/runs/${run_id}).`
})
env:
RUN_ID: ${{ github.run_id }}
- name: Copy Repository Contents
uses: actions/checkout@v2
# - name: Setup Node
# uses: actions/setup-node@v1
# with:
# node-version: '10.x'
- name: Set up Python
uses: actions/setup-python@v2
with:
@ -53,9 +29,6 @@ jobs:
- name: install dependencies
run: |
# sudo apt-get update -y
# sudo apt-get -y --force-yes install chromium-chromedriver
# npm install -g electron@6.1.4 orca
pip3 install -r ./_notebooks/requirements.txt
python3 -m ipykernel install --user --name python3
sudo chmod -R 777 .