Typo fix #127
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: Service | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- urban_heat/** | |
- tasks/** | |
pull_request: | |
branches: | |
- "*" | |
paths: | |
- urban_heat/** | |
- tasks/** | |
jobs: | |
checks: | |
name: Checks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- run: pip install --upgrade pip | |
- run: pip install pipx | |
- run: pipx install poetry | |
- run: poetry config virtualenvs.create false | |
- run: poetry install | |
- run: ruff check . | |
- run: mypy . | |
build: | |
name: Docker Build | |
needs: | |
- checks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
registry: https://ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
tags: ghcr.io/damienallen/urban-heat/service:latest | |
file: ./Dockerfile | |
context: . | |
cache-from: type=registry,ref=ghcr.io/damienallen/urban-heat/service:latest | |
cache-to: type=inline | |
push: true |