Skip to content

Commit 7df2f3f

Browse files
cicd: Fix secrets to deploy maven #TASK-8067
1 parent 70e5f1b commit 7df2f3f

File tree

2 files changed

+22
-10
lines changed

2 files changed

+22
-10
lines changed

.github/actions/setup-java-maven/action.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,19 @@ inputs:
2626
description: "If true, configure Java and Maven for deploy (GPG, Nexus, etc)"
2727
required: false
2828
default: "false"
29-
maven_gpg_private_key:
30-
description: "GPG private key for Maven deploy (base64)"
29+
server-username:
30+
description: "Username for Maven deploy (Nexus)"
3131
required: false
32-
default: ""
33-
maven_gpg_passphrase:
32+
default: "" # env variable for username in deploy
33+
server-password:
34+
description: "Password/token for Maven deploy (Nexus)"
35+
required: false
36+
default: "" # env variable for token in deploy
37+
gpg-private-key:
38+
description: "GPG private key for Maven deploy"
39+
required: false
40+
default: "" # Value of the GPG private key to import
41+
gpg-passphrase:
3442
description: "GPG passphrase for Maven deploy"
3543
required: false
3644
default: ""
@@ -72,10 +80,10 @@ runs:
7280
java-version: ${{ inputs.java_version }}
7381
cache: 'maven'
7482
server-id: ossrh
75-
server-username: MAVEN_NEXUS_USER
76-
server-password: MAVEN_NEXUS_PASSWORD
77-
gpg-private-key: ${{ inputs.maven_gpg_private_key }}
78-
gpg-passphrase: ${{ inputs.maven_gpg_passphrase }}
83+
server-username: ${{ inputs.server-username }}
84+
server-password: ${{ inputs.server-password }}
85+
gpg-private-key: ${{ inputs.gpg-private-key }}
86+
gpg-passphrase: ${{ inputs.gpg-passphrase }}
7987
- name: Clone dependencies and compute dependencies_sha
8088
id: clone_dependencies
8189
if: ${{ inputs.dependency_repos != '' }}

.github/workflows/build.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,12 @@ jobs:
6767
dependency_repos: ${{ inputs.dependency_repos }}
6868
needs_hadoop_preparation: ${{ inputs.needs_hadoop_preparation }}
6969
deploy_maven: ${{ inputs.deploy_maven }}
70-
maven_gpg_private_key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
71-
maven_gpg_passphrase: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
70+
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
71+
server-username: MAVEN_NEXUS_USER # env variable for username in deploy
72+
server-password: MAVEN_NEXUS_PASSWORD # env variable for token in deploy
73+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
74+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
75+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7276
env:
7377
THIRDPARTY_READ_TOKEN: ${{ secrets.THIRDPARTY_READ_TOKEN }}
7478

0 commit comments

Comments
 (0)