Merge branch 'develop' into feature/modularprobe #307
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: CI build | |
on: | |
push: | |
branches: ["**"] | |
pull_request: | |
branches: [develop, edge] | |
workflow_dispatch: {} | |
jobs: | |
build: | |
if: github.repository_owner == 'BrewBlox' | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-qemu-action@v3 | |
- uses: docker/setup-buildx-action@v3 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: (Service) Image metadata | |
id: service_meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ghcr.io/brewblox/brewblox-devcon-spark | |
- name: (Flasher) Image metadata | |
id: flasher_meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ghcr.io/brewblox/brewblox-firmware-flasher | |
- name: Login ghcr.io | |
uses: docker/login-action@v3 | |
if: github.event_name != 'pull_request' | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install uv | |
uses: astral-sh/setup-uv@v4 | |
- name: Install dependencies | |
run: | | |
uv sync | |
- name: Download firmware | |
run: | | |
uv run invoke download-firmware | |
- name: Test | |
run: | | |
uv run pytest | |
- name: Lint | |
uses: astral-sh/ruff-action@v1 | |
with: | |
args: "format --check --diff" | |
- name: (Service) Build Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.service_meta.outputs.tags }} | |
labels: ${{ steps.service_meta.outputs.labels }} | |
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8 | |
file: Dockerfile.service | |
context: . | |
- name: (Flasher) Build Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.flasher_meta.outputs.tags }} | |
labels: ${{ steps.flasher_meta.outputs.labels }} | |
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8 | |
file: Dockerfile.flasher | |
context: . |