CI: build container

This commit is contained in:
phil 2024-10-25 14:03:43 +02:00
parent 25ce207ee3
commit 68a1fecf26
2 changed files with 35 additions and 19 deletions

View file

@ -0,0 +1,35 @@
on:
push:
jobs:
build:
runs-on: container
container:
image: tiptop:5000/treetrail-backend-ci-base
volumes:
- "/root/.cache/uv:uv_cache"
services:
treetrail-database:
image: treetrail-database
steps:
- uses: actions/checkout@v4
- name: Create venv
run: uv venv
- name: Install dependencies
run: uv sync
- name: Run basic test (bootstrap)
run: .venv/bin/pytest -s tests/basic.py
- name: Build container
uses: actions/buildah-build@v1
with:
image: treetrail-srv
#tags: foo # v1 ${{ github.sha }}
containerfiles: |
./Containerfile
- uses: actions/push-to-registry@v2
with:
registry: "docker://${{ vars.REPOSITORY }}"
image: treetrail-srv
tags: latest

View file

@ -1,19 +0,0 @@
on: [push]
jobs:
install:
runs-on: container
container:
image: tiptop:5000/treetrail-backend-ci-base
volumes:
- "/root/.cache/uv:uv_cache"
services:
treetrail-database:
image: treetrail-database
steps:
- uses: actions/checkout@v4
- name: Create venv
run: uv venv
- name: Install dependencies
run: uv sync
- name: Run basic test (bootstrap)
run: .venv/bin/pytest -s tests/basic.py