feat: create/edit product views
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: sh
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: python:3.13-bookworm
|
||||
steps:
|
||||
- name: Checkout
|
||||
run: |
|
||||
git clone https://git.spookydev.com/${{ gitea.repository }}.git .
|
||||
git checkout ${{ gitea.sha }}
|
||||
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
apt-get update -qq
|
||||
apt-get install -y --no-install-recommends libpango-1.0-0 libpangocairo-1.0-0 fonts-dejavu-core gettext
|
||||
|
||||
- name: Install uv
|
||||
run: pip install uv --quiet
|
||||
|
||||
- name: Install dependencies
|
||||
run: uv pip install --system -r pyproject.toml --group=dev
|
||||
|
||||
- name: Compile translations
|
||||
run: uv run python manage.py compilemessages
|
||||
|
||||
- name: Run tests
|
||||
run: uv run pytest --cov
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
steps:
|
||||
- name: Checkout
|
||||
run: |
|
||||
git clone https://git.spookydev.com/${{ gitea.repository }}.git .
|
||||
git checkout ${{ gitea.sha }}
|
||||
|
||||
- name: Build and push
|
||||
run: |
|
||||
docker build -t registry.spookydev.com/${{ gitea.repository }}:${{ gitea.sha }} .
|
||||
docker tag registry.spookydev.com/${{ gitea.repository }}:${{ gitea.sha }} \
|
||||
registry.spookydev.com/${{ gitea.repository }}:latest
|
||||
docker login registry.spookydev.com \
|
||||
-u ${{ secrets.REGISTRY_USER }} \
|
||||
-p ${{ secrets.REGISTRY_PASSWORD }}
|
||||
docker push registry.spookydev.com/${{ gitea.repository }}:${{ gitea.sha }}
|
||||
docker push registry.spookydev.com/${{ gitea.repository }}:latest
|
||||
Reference in New Issue
Block a user