Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding OIDC token & parsed OIDC user as Action outputs #151

Merged
merged 33 commits into from
May 20, 2024

Conversation

carmithersh
Copy link
Contributor

@carmithersh carmithersh commented May 20, 2024

  • All tests passed. If this feature is not already covered by the tests, I added new tests.
  • I used npm run format for formatting the code before submitting the pull request.

Resolves #128
Supercedes #148

Add the OIDC token and parsed OIDC user as outputs of the Setup JFrog CLI action, so they can be utilized in non-CLI actions within the workflow.

Example usage:

- name: Setup JFrog CLI
  id: setup-jfrog-cli
  uses: jfrog/setup-jfrog-cli@v4
  env:
    JF_URL: ${{ secrets.JFROG_PLATFORM_URL }}
  with:
    oidc-provider-name: ${{ env.OIDC_PROVIDER_NAME }}

- name: Authenticate Docker
  uses: docker/login-action@v3
  with:
    registry: ${{ secrets.JFROG_PLATFORM_URL }}/docker
    username: ${{ steps.setup-jfrog-cli.outputs.oidc-user }}
    password: ${{ steps.setup-jfrog-cli.outputs.oidc-token }} 

Copy link
Member

@yahavi yahavi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done @carmithersh!

Please also document this feature in the README.

src/utils.ts Outdated Show resolved Hide resolved
src/utils.ts Outdated Show resolved Hide resolved
src/utils.ts Outdated Show resolved Hide resolved
src/utils.ts Show resolved Hide resolved
src/utils.ts Outdated Show resolved Hide resolved
.github/workflows/oidc-test.yml Outdated Show resolved Hide resolved
action.yml Outdated Show resolved Hide resolved
action.yml Outdated Show resolved Hide resolved
action.yml Outdated Show resolved Hide resolved
action.yml Outdated Show resolved Hide resolved
Co-authored-by: Yahav Itschak <yahavi@users.noreply.github.com>
@carmithersh carmithersh changed the title Adding oidc token & parsed oidc user as outputs from the setup jfrog cli action so they can be used for non cli action within the workflow Adding oidc token & parsed oidc user as action outputs May 20, 2024
Co-authored-by: Yahav Itschak <yahavi@users.noreply.github.com>
@yahavi yahavi added improvement Automatically generated release notes safe to test Approve running integration tests on a pull request labels May 20, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label May 20, 2024
@yahavi yahavi added the safe to test Approve running integration tests on a pull request label May 20, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label May 20, 2024
@yahavi yahavi merged commit 425e54a into jfrog:master May 20, 2024
14 of 15 checks passed
@yahavi yahavi changed the title Adding oidc token & parsed oidc user as action outputs Adding OIDC token & parsed OIDC user as Action outputs May 20, 2024
yahavi added a commit that referenced this pull request May 20, 2024
@yahavi yahavi added ignore for release Automatically generated release notes and removed improvement Automatically generated release notes labels May 20, 2024
yahavi added a commit that referenced this pull request May 20, 2024
yahavi added a commit that referenced this pull request May 21, 2024
yahavi added a commit that referenced this pull request May 21, 2024
yahavi added a commit that referenced this pull request May 21, 2024
@yahavi yahavi added improvement Automatically generated release notes and removed ignore for release Automatically generated release notes labels May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Automatically generated release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide the token as output of OIDC authentication
2 participants