-
Notifications
You must be signed in to change notification settings - Fork 1
/
action.yml
31 lines (31 loc) · 1.54 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: 'Azure Artifacts .npmrc configuration'
description: 'Github Action that configures the .npmrc for accessing private packages published on Azure Artifacts'
inputs:
feeds:
description: 'Comma separated list of feeds'
required: true
token:
description: 'The Personal Access Token (PAT)'
required: true
organization:
description: 'The organization name'
required: true
project:
description: 'The project name'
required: true
username:
description: 'The username'
require: true
runs:
using: "composite"
steps:
- run: |
for feed in $(echo '${{ inputs.feeds }}' | sed "s/,/ /g"); do
echo "//pkgs.dev.azure.com/${{ inputs.organization }}/${{ inputs.project }}/_packaging/$feed/npm/registry/:username=${{ inputs.username }}" >> ~/.npmrc
echo "//pkgs.dev.azure.com/${{ inputs.organization }}/${{ inputs.project }}/_packaging/$feed/npm/registry/:_password=${{ inputs.token }}" >> ~/.npmrc
echo "//pkgs.dev.azure.com/${{ inputs.organization }}/${{ inputs.project }}/_packaging/$feed/npm/registry/:email=none" >> ~/.npmrc
echo "//pkgs.dev.azure.com/${{ inputs.organization }}/${{ inputs.project }}/_packaging/$feed/npm/:username=${{ inputs.username }}" >> ~/.npmrc
echo "//pkgs.dev.azure.com/${{ inputs.organization }}/${{ inputs.project }}/_packaging/$feed/npm/:_password=${{ inputs.token }}" >> ~/.npmrc
echo "//pkgs.dev.azure.com/${{ inputs.organization }}/${{ inputs.project }}/_packaging/$feed/npm/:email=none" >> ~/.npmrc
done
shell: bash