-
Notifications
You must be signed in to change notification settings - Fork 1
/
action.yaml
45 lines (45 loc) · 1.49 KB
/
action.yaml
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---
name: Wrapper for jfrog/setup-jfrog-cli
author: Malena Ebert
description: Setup authenticated JF cli
branding:
color: green
icon: lock
inputs:
jfrogUrl:
description: url of the artifactory instance
default: https://repox.jfrog.io/
required: false
jfrogAccessToken:
description: access token for authentication
required: false
jfrogCliVersion:
description: version of the jfrog cli tool
default: latest
required: false
vaultUrl:
description: url of vault, if fetching a token is required
default: https://vault.sonar.build:8200
required: false
artifactoryRoleSuffix:
description: artifactory reader suffix specified in vault repo config
default: private-reader
required: false
runs:
using: composite
steps:
- name: Fetch access token
id: secrets
if: ${{ !(inputs.jfrogAccessToken) }}
uses: SonarSource/vault-action-wrapper@7461acdbede91679c5c890485f565c80ef74583e # tag=2.4.3-1
with:
url: ${{ inputs.vaultUrl }}
secrets: |
development/artifactory/token/{REPO_OWNER_NAME_DASH}-${{ inputs.artifactoryRoleSuffix }} access_token | artifactory_access_token;
- name: Setup JFrog CLI
uses: jfrog/setup-jfrog-cli@18e785fb220d332edbf01964f853ff0fcaa22220 # v4.4.2
with:
version: ${{ inputs.jfrogCliVersion }}
env:
JF_URL: ${{ inputs.jfrogUrl }}
JF_ACCESS_TOKEN: ${{ inputs.jfrogAccessToken || fromJSON(steps.secrets.outputs.vault).artifactory_access_token }}