Actualizar .github/workflows/publish-gitea.yml
This commit is contained in:
16
.github/workflows/publish-gitea.yml
vendored
16
.github/workflows/publish-gitea.yml
vendored
@@ -12,15 +12,14 @@ jobs:
|
|||||||
container:
|
container:
|
||||||
image: node:20-bullseye
|
image: node:20-bullseye
|
||||||
options: >-
|
options: >-
|
||||||
|
--network gitea_net
|
||||||
--dns 192.168.1.1
|
--dns 192.168.1.1
|
||||||
--add-host git.natxocc.com:host-gateway
|
|
||||||
--add-host gitea:host-gateway
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout código
|
- name: Checkout código
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
env:
|
env:
|
||||||
GIT_CONFIG_PARAMETERS: "'url.https://git.natxocc.com/.insteadOf=http://gitea:3000/'"
|
GIT_CONFIG_PARAMETERS: "'url.http://gitea:3000/.insteadOf=https://git.natxocc.com/'"
|
||||||
|
|
||||||
- name: Instalar Bun
|
- name: Instalar Bun
|
||||||
run: |
|
run: |
|
||||||
@@ -30,16 +29,13 @@ jobs:
|
|||||||
- name: Instalar y Build
|
- name: Instalar y Build
|
||||||
run: |
|
run: |
|
||||||
export PATH="$HOME/.bun/bin:$PATH"
|
export PATH="$HOME/.bun/bin:$PATH"
|
||||||
|
git config --global url."http://gitea:3000/".insteadOf "https://git.natxocc.com/"
|
||||||
bun install
|
bun install
|
||||||
bun run build
|
bun run build
|
||||||
|
|
||||||
- name: Configurar Registro y Publicar
|
- name: Configurar Registro y Publicar
|
||||||
run: |
|
run: |
|
||||||
# 1. Definimos la URL del registro
|
export PATH="$HOME/.bun/bin:$PATH"
|
||||||
REGISTRY="git.natxocc.com/api/packages/natxocc/npm/"
|
REGISTRY="gitea:3000/api/packages/natxocc/npm/"
|
||||||
|
|
||||||
# 2. Configuramos el .npmrc usando tu secreto PACK_TOKEN
|
|
||||||
echo "//${REGISTRY}:_authToken=${{ secrets.PACK_TOKEN }}" > ~/.npmrc
|
echo "//${REGISTRY}:_authToken=${{ secrets.PACK_TOKEN }}" > ~/.npmrc
|
||||||
|
npm publish --registry "http://${REGISTRY}" --userconfig ~/.npmrc
|
||||||
# 3. Publicamos
|
|
||||||
npm publish --registry "https://${REGISTRY}" --userconfig ~/.npmrc
|
|
||||||
Reference in New Issue
Block a user