Files
thc-webhook/.gitea/workflows/build-container.yaml
T
zwitschi 788f3ea6b7
Build and Deploy Docker Container / test (push) Successful in 14s
Build and Deploy Docker Container / build-and-deploy (push) Successful in 29s
feat: remove deployment step from Docker workflow and add nixpacks configuration
2026-05-10 13:31:30 +02:00

56 lines
1.4 KiB
YAML

name: Build and Deploy Docker Container
run-name: ${{ gitea.actor }} runs docker deployment
# run this workflow on push to main branch
on:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Create and activate virtual environment
run: |
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
pip install pytest
- name: Run tests
run: |
source venv/bin/activate
pytest --maxfail=1 --disable-warnings -q
build-and-deploy:
needs: test
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v5
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Registry
uses: docker/login-action@v3
with:
registry: git.allucanget.biz
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: git.allucanget.biz/${{ secrets.REGISTRY_USERNAME }}/thc-webhook:latest