From 0b33663811da11a6468105120e6ebfe731beea26 Mon Sep 17 00:00:00 2001 From: skyflow-shravan Date: Tue, 26 Nov 2024 20:37:24 +0530 Subject: [PATCH] SK-1786 test common workflow --- .github/workflows/internal-release.yml | 5 +++- .github/workflows/shared-build-and-deploy.yml | 29 +++++++------------ 2 files changed, 14 insertions(+), 20 deletions(-) diff --git a/.github/workflows/internal-release.yml b/.github/workflows/internal-release.yml index c2cace08..a354c5cc 100644 --- a/.github/workflows/internal-release.yml +++ b/.github/workflows/internal-release.yml @@ -15,8 +15,11 @@ jobs: ref: ${{ github.ref_name }} is-internal: true server-id: central + profile: jfrog + secrets: server-username: ${{ secrets.ARTIFACTORY_USERNAME }} server-password: ${{ secrets.ARTIFACTORY_PASSWORD }} gpg-key: ${{ secrets.JFROG_GPG_KEY }} gpg-passphrase: ${{ secrets.JFROG_GPG_PASSPHRASE }} - profile: jfrog + + diff --git a/.github/workflows/shared-build-and-deploy.yml b/.github/workflows/shared-build-and-deploy.yml index 10b7324c..10ee9c9f 100644 --- a/.github/workflows/shared-build-and-deploy.yml +++ b/.github/workflows/shared-build-and-deploy.yml @@ -16,31 +16,23 @@ on: description: 'Id of the repository' required: true type: string - - server-username: - description: 'Username of the repository' + + profile: + description: 'Profile to pick from pom.xml' required: true type: string + secrets: + server-username: + required: true server-password: - description: 'Password of the repository' required: true - type: string gpg-key: - description: 'GPG key to access the repository' required: true - type: string gpg-passphrase: - description: 'GPG passphrase to access the repository' required: true - type: string - - profile: - description: 'Profile to pick from pom.xml' - required: true - type: string jobs: publish: @@ -59,7 +51,7 @@ jobs: server-id: ${{ inputs.server-id }} server-username: SERVER_USERNAME server-password: SERVER_PASSWORD - gpg-private-key: ${{ inputs.gpg-key }} # Value of the GPG private key to import + gpg-private-key: ${{ secrets.gpg-key }} # Value of the GPG private key to import gpg-passphrase: GPG_PASSPHRASE # env variable for GPG private key passphrase - name: Get Previous tag @@ -107,7 +99,6 @@ jobs: - name: Publish package run: mvn clean deploy -P ${{ inputs.profile }} env: - SERVER_USERNAME: ${{ inputs.server-username }} - SERVER_PASSWORD: ${{ inputs.server-password }} - GPG_PASSPHRASE: ${{ inputs.gpg-passphrase }} - \ No newline at end of file + SERVER_USERNAME: ${{ secrets.server-username }} + SERVER_PASSWORD: ${{ secrets.server-password }} + GPG_PASSPHRASE: ${{ secrets.gpg-passphrase }}