Deploy dagster and parse #36
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: build-fetcher-image | |
on: | |
pull_request: | |
push: | |
branches: [main] | |
jobs: | |
check_and_build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- uses: abatilo/actions-poetry@v2 | |
- name: run mypy and pytest | |
id: test | |
working-directory: fetcher | |
run: | | |
poetry export --with=dev --without-hashes --format=requirements.txt > requirements.txt | |
poetry run pip install -r requirements.txt | |
poetry run mypy . | |
poetry run pytest | |
echo "VERSION=$(poetry version --short)" >> "$GITHUB_OUTPUT" | |
env: | |
RAW_BUCKET: gs://this-does-not-exist-raw | |
PARSED_BUCKET: gs://this-does-not-exist-parsed | |
- uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: docker/build-push-action@v4 | |
with: | |
context: fetcher | |
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
tags: 'ghcr.io/jarvusinnovations/transit-data-analytics-demo/fetcher:${{ steps.test.outputs.VERSION }}' |