treetrail-backend/.forgejo/workflows/build.yaml

44 lines
1.1 KiB
YAML
Raw Normal View History

2024-10-25 14:03:43 +02:00
on:
push:
2024-10-25 14:03:43 +02:00
jobs:
build:
runs-on: container
container:
2024-10-27 13:35:16 +01:00
image: tiptop:5000/python-ci
2024-10-25 14:03:43 +02:00
volumes:
2024-10-28 13:54:42 +01:00
- "/root/.cache/uv:uv_cache"
2024-10-25 14:03:43 +02:00
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)
2024-10-28 13:54:42 +01:00
run: pytest -s tests/basic.py
2024-10-25 14:03:43 +02:00
2024-10-28 18:11:26 +01:00
- name: Log in to container registry
uses: actions/podman-login@v1
2024-10-28 18:11:26 +01:00
with:
registry: ${{ vars.REPOSITORY }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
2024-10-25 14:03:43 +02:00
- name: Build container
uses: actions/buildah-build@v1
with:
2024-10-27 02:09:13 +02:00
image: treetrail-backend
2024-10-25 14:03:43 +02:00
#tags: foo # v1 ${{ github.sha }}
containerfiles: |
./Containerfile.for_runner
2024-10-25 14:03:43 +02:00
- uses: actions/push-to-registry@v2
with:
registry: "docker://${{ vars.REPOSITORY }}"
2024-10-27 02:09:13 +02:00
image: treetrail-backend
2024-10-25 14:03:43 +02:00
tags: latest