Nuevo testeo de CI/CD.
This commit is contained in:
@@ -1,35 +1,26 @@
|
|||||||
name: Build y Deploy a Producción
|
name: Build y Deploy a Producción
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches: [main]
|
||||||
- main # O la rama que uses para producción
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Construir y Subir Imágenes Docker
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout del código
|
- name: Checkout del código
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Login al Registro de Gitea
|
- name: Login al Registro de Gitea
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: ${{ secrets.REGISTRY_URL }}
|
registry: gitea:5000
|
||||||
username: ${{ gitea.actor }}
|
username: ${{ gitea.actor }}
|
||||||
password: ${{ secrets.ACTIONS_PAT }}
|
password: ${{ secrets.ACTIONS_PAT }}
|
||||||
|
|
||||||
- name: Construir y Subir API Backend
|
- name: Construir y Subir API Backend
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./Backend/GestionIntegral.Api/Dockerfile
|
file: ./Backend/GestionIntegral.Api/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: gitea:5000/${{ gitea.repository }}/api:latest
|
||||||
${{ secrets.REGISTRY_URL }}/${{ gitea.repository }}/api:latest
|
|
||||||
${{ secrets.REGISTRY_URL }}/${{ gitea.repository }}/api:${{ gitea.sha_short }}
|
|
||||||
|
|
||||||
- name: Construir y Subir Frontend
|
- name: Construir y Subir Frontend
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
@@ -38,9 +29,7 @@ jobs:
|
|||||||
context: .
|
context: .
|
||||||
file: ./Frontend/Dockerfile
|
file: ./Frontend/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: gitea:5000/${{ gitea.repository }}/api:latest
|
||||||
${{ secrets.REGISTRY_URL }}/${{ gitea.repository }}/frontend:latest
|
|
||||||
${{ secrets.REGISTRY_URL }}/${{ gitea.repository }}/frontend:${{ gitea.sha_short }}
|
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
name: Desplegar a Producción
|
name: Desplegar a Producción
|
||||||
|
|||||||
Reference in New Issue
Block a user