Añadir .github/workflows/publicar-paquete.yml
This commit is contained in:
36
.github/workflows/publicar-paquete.yml
vendored
Normal file
36
.github/workflows/publicar-paquete.yml
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
name: Generar Paquete Docker
|
||||
|
||||
on:
|
||||
# Permite ejecutarlo manualmente desde la pestaña "Acciones"
|
||||
workflow_dispatch:
|
||||
# Opcional: que se ejecute solo al crear una "Release" o etiqueta (tag)
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest # Esto coincidirá con el label de tu runner
|
||||
steps:
|
||||
- name: Checkout del código
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Configurar Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login en Gitea Docker Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.natxocc.com
|
||||
username: ${{ gitea.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }} # Gitea genera este token automáticamente
|
||||
|
||||
- name: Construir y Subir imagen
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
# El nombre será: git.natxocc.com/usuario/repositorio:latest
|
||||
tags: |
|
||||
git.natxocc.com/${{ gitea.repository }}:latest
|
||||
git.natxocc.com/${{ gitea.repository }}:${{ gitea.ref_name }}
|
||||
Reference in New Issue
Block a user