Actualizar .github/workflows/publish.yml
This commit is contained in:
25
.github/workflows/publish.yml
vendored
25
.github/workflows/publish.yml
vendored
@@ -5,29 +5,32 @@ on:
|
|||||||
types: [published]
|
types: [published]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: node:20-bullseye
|
image: node:20-bullseye
|
||||||
options: >-
|
# Esto lo mete en el mismo "pasillo" que Gitea
|
||||||
--add-host gitea:192.168.1.100
|
options: --network gitea_net
|
||||||
--add-host git.natxocc.com:192.168.1.100
|
|
||||||
steps:
|
steps:
|
||||||
- name: Forzar resolución y puerto
|
- name: Configurar Git Interno
|
||||||
run: |
|
run: |
|
||||||
# Si Gitea pide el puerto 3000, lo mandamos al 3333 que es el que tienes abierto
|
# Forzamos que confíe en el directorio
|
||||||
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 --add safe.directory /workspace/natxocc/sigpro
|
||||||
git config --global http.sslVerify false
|
# Por si acaso Gitea envía la IP en lugar del nombre, lo redirigimos al nombre interno
|
||||||
|
git config --global url."http://gitea:3000/".insteadOf "http://192.168.1.100:3333/"
|
||||||
|
|
||||||
- name: Checkout código
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
- name: Publicar en NPM
|
- uses: oven-sh/setup-bun@v1
|
||||||
|
with:
|
||||||
|
bun-version: latest
|
||||||
|
|
||||||
|
- name: Publicar
|
||||||
run: |
|
run: |
|
||||||
npm install
|
bun install
|
||||||
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
|
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
|
||||||
npm publish --access public
|
npm publish --access public
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user