Compare commits

...

3 Commits

Author SHA1 Message Date
4361a7fdd9 Añadir .dockerignore 2026-02-01 22:32:59 +00:00
90d236e8f0 Actualizar .gitignore 2026-02-01 22:30:48 +00:00
eb07818665 Actualizar .gitea/workflows/ci.yaml 2026-02-01 22:30:11 +00:00
3 changed files with 26 additions and 9 deletions

8
.dockerignore Normal file
View File

@@ -0,0 +1,8 @@
.git
.venv
__pycache__
.pytest_cache
tests
.coverage
devcontainer.json
.devcontainer

View File

@@ -28,20 +28,30 @@ jobs:
- name: Run Tests with Coverage
run: poetry run pytest --cov --cov-report=term-missing --cov-fail-under=80
publish-container:
needs: test-and-lint
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v3
- name: Prepare Docker Metadata
id: meta
run: |
echo "REGISTRY_HOST=${GITEA_SERVER_URL#*://}" >> $GITHUB_OUTPUT
echo "IMAGE_NAME=$(echo ${{ gitea.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
env:
GITEA_SERVER_URL: ${{ gitea.server_url }}
- name: Login to Gitea Container Registry
uses: docker/login-action@v2
with:
registry: ${{ gitea.server_url }}
# Nota: Quita 'https://' si server_url lo incluye y falla, suele ser solo dominio:puerto
username: ${{ gitea.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ${{ steps.meta.outputs.REGISTRY_HOST }}
username: ${{ github.actor }}
password: ${{ secrets.PACKAGES_TOKEN }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v4
@@ -49,5 +59,5 @@ jobs:
context: .
push: true
tags: |
${{ gitea.server_url }}/${{ gitea.repository }}:latest
${{ gitea.server_url }}/${{ gitea.repository }}:${{ gitea.ref_name }}
${{ steps.meta.outputs.REGISTRY_HOST }}/${{ steps.meta.outputs.IMAGE_NAME }}:latest
${{ steps.meta.outputs.REGISTRY_HOST }}/${{ steps.meta.outputs.IMAGE_NAME }}:${{ gitea.ref_name }}

1
.gitignore vendored
View File

@@ -2,7 +2,6 @@
__pycache__/
*.py[cod]
*$py.class
poetry.lock
# --- Distribución y Build ---
dist/
build/