Skip to content

Commit 3218ca2

Browse files

File tree

2 files changed

+7
-25
lines changed

2 files changed

+7
-25
lines changed

.github/workflows/cd-integrations.yml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@ name: Release
33
on:
44
workflow_call:
55
secrets:
6-
NPM_USER:
7-
description: "repository NPM_USER secret passed on"
8-
required: false
9-
NPM_PASS:
10-
description: "repository NPM_PASS secret passed on"
6+
VERDACCIO_AUTH_TOKEN:
117
required: false
128
inputs:
139
enterprise:
@@ -35,13 +31,7 @@ jobs:
3531
uses: actions/setup-node@v4
3632
with:
3733
node-version-file: '.node-version'
38-
39-
- name: Log into Verdaccio
40-
if: ${{ inputs.enterprise }}
41-
shell: bash
42-
run: |
43-
npm install -g npm-cli-login
44-
npm-cli-login -u "${{ secrets.NPM_USER }}" -p "${{ secrets.NPM_PASS }}" -e doesntmatter@example.com -r https://registrynpm.storefrontcloud.io
34+
registry-url: ${{ inputs.enterprise && 'https://registrynpm.storefrontcloud.io' || '' }}
4535

4636
- name: Install dependencies
4737
shell: bash
@@ -59,4 +49,4 @@ jobs:
5949
env:
6050
# Needs access to push to main
6151
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62-
NPM_TOKEN: ${{ secrets.NPM_RELEASE_TOKEN }}
52+
NPM_TOKEN: ${{ inputs.enterprise && secrets.VERDACCIO_AUTH_TOKEN || secrets.NPM_RELEASE_TOKEN }}

.github/workflows/ci-integrations.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@ name: Continous Integration
33
on:
44
workflow_call:
55
secrets:
6-
NPM_USER:
7-
description: 'repository NPM_USER secret passed on'
8-
required: false
9-
NPM_PASS:
10-
description: 'repository NPM_PASS secret passed on'
6+
VERDACCIO_AUTH_TOKEN:
117
required: false
128

139
inputs:
@@ -75,6 +71,7 @@ jobs:
7571
uses: actions/setup-node@v4
7672
with:
7773
node-version: ${{ matrix.node_version }}
74+
registry-url: ${{ inputs.enterprise && 'https://registrynpm.storefrontcloud.io' || '' }}
7875

7976
- name: Get cache 🗄️
8077
id: cache
@@ -83,17 +80,12 @@ jobs:
8380
path: '**/node_modules'
8481
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}-${{ matrix.node_version }}
8582

86-
- name: Log into Verdaccio
87-
if: ${{ inputs.enterprise }}
88-
shell: bash
89-
run: |
90-
npm install -g npm-cli-login
91-
npm-cli-login -u "${{ secrets.NPM_USER }}" -p "${{ secrets.NPM_PASS }}" -e doesntmatter@example.com -r https://registrynpm.storefrontcloud.io
92-
9383
- name: Install dependencies (OS)
9484
if: ${{ !steps.cache.outputs.cache-hit }}
9585
shell: bash
9686
run: yarn --frozen-lockfile
87+
env:
88+
NODE_AUTH_TOKEN: ${{ secrets.VERDACCIO_AUTH_TOKEN }}
9789

9890
- name: Detect circular dependencies 🔄
9991
uses: vuestorefront/vue-storefront/actions/circular-dependencies@main

0 commit comments

Comments
 (0)