Skip to content

Update USCIS times data #515

Update USCIS times data

Update USCIS times data #515

name: Update USCIS times data
on:
schedule:
# check every day at a random time
- cron: 22 7 * * *
workflow_dispatch:
defaults:
run:
working-directory: data/uscis
jobs:
update-uscis-times-data:
name: Update USCIS times data
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
new-commit-sha: ${{ steps.head_commit.outputs.commit_sha }}
updated: ${{ steps.commit.outputs.pushed }}
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Set up poetry
run: pipx install poetry
- name: Cache poetry virtualenv
uses: actions/cache@v3
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-data-uscis-${{ hashFiles('data/uscis/poetry.lock') }}
- name: Install dependencies
run: poetry install
- name: Run script
run: poetry run python times.py
- name: Commit changes
id: commit
uses: EndBug/add-and-commit@v9
- id: head_commit
run: echo "::set-output name=commit_sha::$(git rev-parse HEAD)"