Skip to content

Aggregate services by slug, show instance count and external services #62

Aggregate services by slug, show instance count and external services

Aggregate services by slug, show instance count and external services #62

Workflow file for this run

name: Build and Push Docker Images
on:
push:
branches: [main]
tags: ["v*"]
paths:
- 'Dockerfile'
- 'Dockerfile.worker'
- 'requirements.txt'
- 'requirements-worker.txt'
- 'app/**'
- 'services/**'
- '.github/workflows/build.yml'
workflow_dispatch:
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install ruff
run: pip install ruff
- name: Lint and format check
run: ruff check app/ && ruff format --check app/
build:
needs: lint
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
include:
- image: drumsergio/cashpilot
dockerfile: Dockerfile
- image: drumsergio/cashpilot-worker
dockerfile: Dockerfile.worker
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels)
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ matrix.image }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: ${{ matrix.dockerfile }}
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha,scope=${{ matrix.image }}
cache-to: type=gha,mode=max,scope=${{ matrix.image }}