Skip to content

Update Database

Update Database #1497

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Update Database
concurrency:
group: database-build
# Controls when the action will run.
on:
schedule:
- cron: '15 4 * * *'
# 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"
build:
# 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
- name: Set current date as env variable
run: echo "BEGIN_NLRB_RUN=$(date +'%s')" >> $GITHUB_ENV
- uses: actions/checkout@v2
- name: install requirements
run: pip install -r requirements.txt
# Runs a single command using the runners shell
- name: update tally
env:
CHROMEDRIVER_PATH: /usr/bin/chromedriver
run: |
echo $BEGIN_NLRB_RUN
/usr/bin/chromedriver -v
make update_tally
continue-on-error: true
# Runs a single command using the runners shell
- name: build database
env:
CHROMEDRIVER_PATH: /usr/bin/chromedriver
run: |
echo $BEGIN_NLRB_RUN
make
- name: setup asset
run: |
mkdir public
zip nlrb.db.zip nlrb.db
- name: release
uses: WebFreak001/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # automatically provided by github actions
with:
upload_url: https://uploads.github.com/repos/labordata/nlrb-data/releases/46019246/assets{?name,label}
release_id: 46019246
asset_path: ./nlrb.db.zip # path to archive to upload
asset_name: nlrb.db.zip # name to upload the release as, use $$ to insert date (YYYYMMDD) and 6 letter commit hash
asset_content_type: application/zip # required by GitHub API
max_releases: 7 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted
- name: keepalive
uses: gautamkrishnar/keepalive-workflow@v1