Merge pull request #2572 from openstates/update-multi-jurisdiction-ot… #925
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Database | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
update-database: | |
runs-on: ubuntu-latest | |
steps: | |
# Python & dependency installation | |
- uses: actions/checkout@v3 | |
- name: Yaml file linting | |
run: | | |
docker run --rm \ | |
-v $(pwd):/code \ | |
registry.gitlab.com/pipeline-components/yamllint:latest \ | |
-s . | |
- name: setup Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: install Poetry | |
uses: snok/[email protected] | |
- name: cache Poetry virtualenv | |
uses: actions/cache@v3 | |
id: cache | |
with: | |
path: ~/.virtualenvs/ | |
key: poetry-${{ hashFiles('**/poetry.lock') }} | |
restore-keys: | | |
poetry-${{ hashFiles('**/poetry.lock') }} | |
- name: set poetry config path | |
run: poetry config virtualenvs.path ~/.virtualenvs | |
- name: install dependencies | |
run: poetry install --no-root | |
# if: steps.cache.outputs.cache-hit != 'true' | |
- name: people to S3 | |
run: poetry run os-people to-csv --upload | |
env: | |
OS_PEOPLE_DIRECTORY: ${{ env.GITHUB_WORKSPACE }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |