feat: enhance CI/CD pipeline with build and push steps for Docker images
Some checks failed
CI/CD Pipeline / test (push) Successful in 18s
CI/CD Pipeline / build (push) Successful in 16s
CI/CD Pipeline / push (push) Failing after 5s

This commit is contained in:
2025-11-01 19:04:05 +01:00
parent 2238a286d4
commit a51d500777
2 changed files with 27 additions and 6 deletions

View File

@@ -32,6 +32,13 @@ jobs:
# run: |
# python -m flake8 web/ tests/ --max-line-length=120
build:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build Docker image
run: |
docker build -t jobs-app .
@@ -40,6 +47,23 @@ jobs:
run: |
docker run --rm jobs-app python -m pytest tests/ -v
push:
runs-on: ubuntu-latest
needs: [build, test]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Push Docker image to gitea registry
uses: docker/build-push-action@v4
env:
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
with:
context: .
push: true
tags: git.allucanget.biz/allucanget/jobs-app:latest
# deploy:
# runs-on: ubuntu-latest
# needs: test