diff --git a/actions/jfrog-login/README.md b/actions/jfrog-login/README.md index d539b6c..5587421 100644 --- a/actions/jfrog-login/README.md +++ b/actions/jfrog-login/README.md @@ -43,8 +43,18 @@ jobs: | `oidc-token` |

OIDC token generated by JFrog CLI for secure API/CLI interactions, using the Setup JFrog CLI step with the configured oidc-provider-name.

| | `oidc-user` |

Username extracted from the OIDC token during authentication.

| | `jfrog-url` |

Base URL of Ledger's JFrog platform to be used for subsequent API/CLI operations.

| +| `jfrog-domain` |

Base domain of Ledger's JFrog platform to be used for subsequent API/CLI operations.

| +Those are also exposed as environment variables: + +| name | description | +| --- | --- | +| `JFROG_TOKEN` |

OIDC token generated by JFrog CLI for secure API/CLI interactions, using the Setup JFrog CLI step with the configured oidc-provider-name.

| +| `JFROG_USER` |

Username extracted from the OIDC token during authentication.

| +| `JFROG_URL` |

Base URL of Ledger's JFrog platform to be used for subsequent API/CLI operations.

| +| `JFROG_DOMAIN` |

Base domain of Ledger's JFrog platform to be used for subsequent API/CLI operations.

| + ## Runs This action is a **composite action**, which allows us to combine multiple workflow steps into a single, reusable action. This promotes modularity and simplifies our workflows. @@ -52,4 +62,4 @@ This action is a **composite action**, which allows us to combine multiple workf ## Additional Information - This action securely manages the OIDC-based login for Ledger's JFrog platform, removing the need for manual credential handling. -- Ensure your GitHub repository and workflows are configured to use OIDC for maximum security and efficiency. \ No newline at end of file +- Ensure your GitHub repository and workflows are configured to use OIDC for maximum security and efficiency. diff --git a/actions/jfrog-login/action.yml b/actions/jfrog-login/action.yml index 8ddf20d..5ff5d24 100644 --- a/actions/jfrog-login/action.yml +++ b/actions/jfrog-login/action.yml @@ -15,6 +15,9 @@ outputs: jfrog-url: description: "Base URL of Ledger's JFrog platform to be used for subsequent API/CLI operations." value: "https://jfrog.ledgerlabs.net" + jfrog-domain: + description: "Base domain of Ledger's JFrog platform to be used for subsequent API/CLI operations." + value: "jfrog.ledgerlabs.net" runs: using: "composite" @@ -25,4 +28,14 @@ runs: JF_URL: "https://jfrog.ledgerlabs.net" with: oidc-provider-name: github-oidc - oidc-audience: jfrog-github \ No newline at end of file + oidc-audience: jfrog-github + - name: Expose outputs as environment variables + run: | + : Expose outputs as environment variables + echo "JFROG_USER=${{ steps.setup-jfrog-cli.outputs.oidc-user }}" >> $GITHUB_ENV + echo "JFROG_TOKEN=${{ steps.setup-jfrog-cli.outputs.oidc-token }}" >> $GITHUB_ENV + echo "JFROG_DOMAIN=${JFROG_DOMAIN}" >> $GITHUB_ENV + echo "JFROG_URL=https://${JFROG_DOMAIN}" >> $GITHUB_ENV + env: + JFROG_DOMAIN: jfrog.ledgerlabs.net + shell: bash