Actualizar .github/workflows/publish.yml
This commit is contained in:
17
.github/workflows/publish.yml
vendored
17
.github/workflows/publish.yml
vendored
@@ -8,24 +8,25 @@ jobs:
|
|||||||
publish:
|
publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
# Usamos Bullseye porque ya incluye Git y NPM compatibles
|
|
||||||
image: node:20-bullseye
|
image: node:20-bullseye
|
||||||
options: >-
|
options: >-
|
||||||
--dns 192.168.1.1
|
--dns 192.168.1.1
|
||||||
--add-host git.natxocc.com:host-gateway
|
--add-host gitea:192.168.1.100
|
||||||
|
--add-host git.natxocc.com:192.168.1.100
|
||||||
steps:
|
steps:
|
||||||
# 1. Forzamos a Git a confiar en el directorio (evita errores de permisos en Docker)
|
- name: Configurar Entorno
|
||||||
- name: Configurar Git Safe Directory
|
run: |
|
||||||
run: git config --global --add safe.directory /workspace/natxocc/sigpro
|
# Esto obliga a Git a redirigir CUALQUIER URL que use el puerto 3000 al puerto 3333
|
||||||
|
# Por si Gitea le envía la URL interna al runner
|
||||||
|
git config --global url."http://192.168.1.100:3333/".insteadOf "http://gitea:3000/"
|
||||||
|
git config --global --add safe.directory /workspace/natxocc/sigpro
|
||||||
|
git config --global http.sslVerify false
|
||||||
|
|
||||||
# 2. Descargamos el código
|
|
||||||
- name: Checkout código
|
- name: Checkout código
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
# Esto obliga a usar el binario de Git instalado en Node-Bullseye
|
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
# 3. Instalamos dependencias y publicamos
|
|
||||||
- name: Publicar en NPM
|
- name: Publicar en NPM
|
||||||
run: |
|
run: |
|
||||||
npm install
|
npm install
|
||||||
|
|||||||
Reference in New Issue
Block a user