cloud-api/.forgejo/workflows/publish.yaml
irl df8ab32cb1
Some checks failed
ci / ruff (push) Failing after 3s
ci / ty (push) Failing after 4s
ci / tests (push) Failing after 7s
ci / build (push) Has been cancelled
ci: build and publish OCI image
2026-06-22 14:38:23 +01:00

78 lines
2.1 KiB
YAML

---
name: ci
on:
push:
branches:
- main
jobs:
ruff:
runs-on: docker
continue-on-error: true
container:
image: ghcr.io/astral-sh/uv:alpine
steps:
- run: apk add --no-cache nodejs npm git
- uses: actions/checkout@v4
with:
submodules: true
- run: uv python install # Gets Python version from pyproject.toml
- run: uv sync --dev
- run: uv run ruff check
- run: uv run ruff format
ty:
runs-on: docker
continue-on-error: true
container:
image: ghcr.io/astral-sh/uv:alpine
steps:
- run: apk add --no-cache nodejs npm git
- uses: actions/checkout@v4
with:
submodules: true
- run: uv python install # Gets Python version from pyproject.toml
- run: uv sync --dev
- run: uv run ty check
env:
ENVIRONMENT: testing
tests:
runs-on: docker
continue-on-error: true
container:
image: ghcr.io/astral-sh/uv:alpine
steps:
- run: apk add --no-cache nodejs npm git
- uses: actions/checkout@v4
with:
submodules: true
- run: uv python install # Gets Python version from pyproject.toml
- run: uv sync --dev
- run: uv run pytest test
env:
ENVIRONMENT: testing
build:
needs: [ ruff, ty, tests ]
if: ${{ always() && needs.ruff.result == 'success' && needs.ty.result == 'success' && needs.tests.result == 'success' }}
container:
image: ghcr.io/catthehacker/ubuntu:act-latest
options: -v /dind/docker.sock:/var/run/docker.sock
steps:
- name: Checkout the repo
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to the registry
uses: docker/login-action@v3
with:
registry: guardianproject.dev
username: irl
password: ${{ secrets.PACKAGE_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
file: Containerfile
push: true
tags: guardianproject.dev/${{ github.repository }}:${{ github.branch }}