Fix upload action #29
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: Push | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
docker: | |
name: Docker | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Log in to the Container registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{github.actor}} | |
password: ${{secrets.GITHUB_TOKEN}} | |
- name: Build container | |
run: docker build . -f docker/policyengine_us_data.Dockerfile -t ghcr.io/policyengine/policyengine-us-data:latest | |
- name: Push container | |
run: docker push ghcr.io/policyengine/policyengine-us-data:latest | |
build: | |
name: Build and test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Install package | |
run: make install | |
- name: Download data inputs | |
run: make download | |
env: | |
POLICYENGINE_US_DATA_GITHUB_TOKEN: ${{ secrets.POLICYENGINE_US_DATA_GITHUB_TOKEN }} | |
- name: Build datasets | |
run: make data | |
- name: Run tests | |
run: make test | |
- name: Upload data | |
run: make upload | |
env: | |
POLICYENGINE_US_DATA_GITHUB_TOKEN: ${{ secrets.POLICYENGINE_US_DATA_GITHUB_TOKEN }} | |
lint: | |
runs-on: ubuntu-latest | |
name: Lint | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check formatting | |
uses: "lgeiger/black-action@master" | |
with: | |
args: ". -l 79 --check" | |
publish: | |
runs-on: ubuntu-latest | |
name: Publish | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Install package | |
run: make install | |
- name: Build package | |
run: make build | |
- name: Publish a Python distribution to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI }} | |
skip-existing: true | |