jfrog / setup-jfrog-cli

Set up JFrog CLI in your GitHub Actions workflow
Apache License 2.0
246 stars 78 forks source link

Use oidc-user and oidc-token to run actions in a container #219

Open sethamclean opened 1 week ago

sethamclean commented 1 week ago

How can we help?

What is the expected way to run a github action in a container from an artifactory private registry using OIDC authentication? As far as I can tell the credentials need to be provided prior to any steps being executed and secrets can't be passed between jobs.

hello-from-container:
    runs-on: ubuntu-latest
    needs: login-via-oidc
    container:
      image: ${{ env.registry }}/ubuntu:latest
      credentials:
        username: "${{ needs.login-via-oidc.outputs.docker_user }}"
        password: "${{ needs.login-via-oidc.outputs.docker_pass }}"
    steps:
      - name: hello
        run: |
          "echo hello"