-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
161 lines (157 loc) · 4.83 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
name: Setup Maven Settings
description: Configure a settings.xml file with access to Bonitasoft Artifactory
author: Bonitasoft
inputs:
keeper-secret-config:
description: The Keeper Secret Manager configuration
required: true
runs:
using: composite
steps:
- name: Retrieve Artifactory secrets from Keeper
uses: Keeper-Security/ksm-action@v1
with:
keeper-secret-config: ${{ inputs.keeper-secret-config }}
secrets: |
UMJm296qDNVf1lj83G3Uwg/field/login > env:JFROG_USER
UMJm296qDNVf1lj83G3Uwg/field/password > env:JFROG_TOKEN
9aU6tget4-Q-1alHvAIp5g/field/login > env:OSSRH_USERNAME
9aU6tget4-Q-1alHvAIp5g/field/password > env:OSSRH_PSW
1W-qBXHmaENw-ZmeMzDS4A/field/login > env:GPG_KEYNAME
1W-qBXHmaENw-ZmeMzDS4A/custom_field/gpg-private-key > env:GPG_PRIVATE_KEY
1W-qBXHmaENw-ZmeMzDS4A/field/password > env:MAVEN_GPG_PASSPHRASE
- name: Import GPG key
id: import-gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ env.GPG_PRIVATE_KEY }}
passphrase: ${{ env.MAVEN_GPG_PASSPHRASE }}
fingerprint: ${{ env.GPG_KEYNAME }}
- name: Setup Maven configuration
uses: whelk-io/maven-settings-xml-action@v22
with:
profiles: >
[
{
"id" : "gpg",
"properties": {
"gpg.keyname": "${{ env.GPG_KEYNAME }}"
}
}
]
active_profiles: >
[
"gpg",
"github"
]
repositories: >
[
{
"id": "releases",
"name": "releases",
"url": "https://bonitasoft.jfrog.io/artifactory/releases",
"releases": {
"enabled": "true"
},
"snapshots": {
"enabled": "false"
}
},
{
"id": "snapshots",
"name": "snapshots",
"url": "https://bonitasoft.jfrog.io/artifactory/snapshots",
"releases": {
"enabled": "false"
},
"snapshots": {
"enabled": "true"
}
},
{
"id": "ossrh-snapshots",
"name": "ossrh-snapshots",
"url" : "https://oss.sonatype.org/content/repositories/snapshots",
"releases": {
"enabled": "false"
},
"snapshots": {
"enabled": "true"
}
},
{
"id": "ext-release-local",
"name": "ext-release-local",
"url": "https://bonitasoft.jfrog.io/artifactory/ext-release-local",
"releases": {
"enabled": "true"
},
"snapshots": {
"enabled": "false"
}
}
]
plugin_repositories: >
[
{
"id": "releases",
"name": "releases",
"url": "https://bonitasoft.jfrog.io/artifactory/releases",
"releases": {
"enabled": "true"
},
"snapshots": {
"enabled": "false"
}
},
{
"id": "snapshots",
"name": "snapshots",
"url": "https://bonitasoft.jfrog.io/artifactory/snapshots",
"releases": {
"enabled": "false"
},
"snapshots": {
"enabled": "true"
}
},
{
"id": "ossrh-snapshots",
"name": "ossrh-snapshots",
"url" : "https://oss.sonatype.org/content/repositories/snapshots",
"releases": {
"enabled": "false"
},
"snapshots": {
"enabled": "true"
}
}
]
servers: >
[
{
"id": "releases",
"username": "${{ env.JFROG_USER }}",
"password": "${{ env.JFROG_TOKEN }}"
},
{
"id": "snapshots",
"username": "${{ env.JFROG_USER }}",
"password": "${{ env.JFROG_TOKEN }}"
},
{
"id": "staging",
"username": "${{ env.JFROG_USER }}",
"password": "${{ env.JFROG_TOKEN }}"
},
{
"id": "ossrh",
"username": "${{ env.OSSRH_USERNAME }}",
"password": "${{ env.OSSRH_PSW }}"
},
{
"id": "ext-release-local",
"username": "${{ env.JFROG_USER }}",
"password": "${{ env.JFROG_TOKEN }}"
}
]