forked from innovacion/Mayacontigo
274 lines
8.7 KiB
YAML
274 lines
8.7 KiB
YAML
name: Release - Build & Push Containers
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'apps/**'
|
|
- '.containers/python/Dockerfile'
|
|
- 'packages/**'
|
|
- 'pyproject.toml'
|
|
- 'uv.lock'
|
|
|
|
env:
|
|
REGISTRY: gitea.ia-innovacion.work
|
|
REGISTRY_PATH: innovacion/mayacontigo
|
|
|
|
jobs:
|
|
detect-changes:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
bursatil: ${{ steps.filter.outputs.bursatil }}
|
|
ChatEgresos: ${{ steps.filter.outputs.ChatEgresos }}
|
|
inversionistas: ${{ steps.filter.outputs.inversionistas }}
|
|
normativa: ${{ steps.filter.outputs.normativa }}
|
|
ocp: ${{ steps.filter.outputs.ocp }}
|
|
pyme: ${{ steps.filter.outputs.pyme }}
|
|
riesgos: ${{ steps.filter.outputs.riesgos }}
|
|
Test: ${{ steps.filter.outputs.Test }}
|
|
voz-del-cliente: ${{ steps.filter.outputs.voz-del-cliente }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Detect changed apps
|
|
uses: dorny/paths-filter@v3
|
|
id: filter
|
|
with:
|
|
base: main
|
|
filters: |
|
|
bursatil:
|
|
- 'apps/bursatil/**'
|
|
ChatEgresos:
|
|
- 'apps/ChatEgresos/**'
|
|
inversionistas:
|
|
- 'apps/inversionistas/**'
|
|
normativa:
|
|
- 'apps/normativa/**'
|
|
ocp:
|
|
- 'apps/ocp/**'
|
|
pyme:
|
|
- 'apps/pyme/**'
|
|
riesgos:
|
|
- 'apps/riesgos/**'
|
|
Test:
|
|
- 'apps/Test/**'
|
|
voz-del-cliente:
|
|
- 'apps/voz-del-cliente/**'
|
|
|
|
build-bursatil:
|
|
needs: detect-changes
|
|
if: needs.detect-changes.outputs.bursatil == 'true'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Log in to Gitea Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: .containers/python/Dockerfile
|
|
push: true
|
|
tags: |
|
|
${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}-bursatil:latest
|
|
${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}-bursatil:${{ github.sha }}
|
|
build-args: |
|
|
PACKAGE=bursatil
|
|
|
|
build-ChatEgresos:
|
|
needs: detect-changes
|
|
if: needs.detect-changes.outputs.ChatEgresos == 'true'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Log in to Gitea Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: .containers/python/Dockerfile
|
|
push: true
|
|
tags: |
|
|
${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}-ChatEgresos:latest
|
|
${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}-ChatEgresos:${{ github.sha }}
|
|
build-args: |
|
|
PACKAGE=ChatEgresos
|
|
|
|
build-inversionistas:
|
|
needs: detect-changes
|
|
if: needs.detect-changes.outputs.inversionistas == 'true'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Log in to Gitea Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: .containers/python/Dockerfile
|
|
push: true
|
|
tags: |
|
|
${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}-inversionistas:latest
|
|
${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}-inversionistas:${{ github.sha }}
|
|
build-args: |
|
|
PACKAGE=inversionistas
|
|
|
|
build-normativa:
|
|
needs: detect-changes
|
|
if: needs.detect-changes.outputs.normativa == 'true'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Log in to Gitea Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: .containers/python/Dockerfile
|
|
push: true
|
|
tags: |
|
|
${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}-normativa:latest
|
|
${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}-normativa:${{ github.sha }}
|
|
build-args: |
|
|
PACKAGE=normativa
|
|
|
|
build-ocp:
|
|
needs: detect-changes
|
|
if: needs.detect-changes.outputs.ocp == 'true'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Log in to Gitea Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: .containers/python/Dockerfile
|
|
push: true
|
|
tags: |
|
|
${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}-ocp:latest
|
|
${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}-ocp:${{ github.sha }}
|
|
build-args: |
|
|
PACKAGE=ocp
|
|
|
|
build-pyme:
|
|
needs: detect-changes
|
|
if: needs.detect-changes.outputs.pyme == 'true'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Log in to Gitea Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: .containers/python/Dockerfile
|
|
push: true
|
|
tags: |
|
|
${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}-pyme:latest
|
|
${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}-pyme:${{ github.sha }}
|
|
build-args: |
|
|
PACKAGE=pyme
|
|
|
|
build-riesgos:
|
|
needs: detect-changes
|
|
if: needs.detect-changes.outputs.riesgos == 'true'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Log in to Gitea Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: .containers/python/Dockerfile
|
|
push: true
|
|
tags: |
|
|
${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}-riesgos:latest
|
|
${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}-riesgos:${{ github.sha }}
|
|
build-args: |
|
|
PACKAGE=riesgos
|
|
|
|
build-Test:
|
|
needs: detect-changes
|
|
if: needs.detect-changes.outputs.Test == 'true'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Log in to Gitea Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: .containers/python/Dockerfile
|
|
push: true
|
|
tags: |
|
|
${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}-Test:latest
|
|
${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}-Test:${{ github.sha }}
|
|
build-args: |
|
|
PACKAGE=Test
|
|
|
|
build-voz-del-cliente:
|
|
needs: detect-changes
|
|
if: needs.detect-changes.outputs.voz-del-cliente == 'true'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Log in to Gitea Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: .containers/python/Dockerfile
|
|
push: true
|
|
tags: |
|
|
${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}-voz-del-cliente:latest
|
|
${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}-voz-del-cliente:${{ github.sha }}
|
|
build-args: |
|
|
PACKAGE=voz-del-cliente
|