setup-jfrog-cli
setup-jfrog-cli copied to clipboard
Support authentication with direct connection config environment variables
- [ ] All tests passed. If this feature is not already covered by the tests, I added new tests.
- [ ] I used
npm run formatfor formatting the code before submitting the pull request.
Setting direct connection details environment variables
You can use connection details directly by settings one of the following environment variables combinations:
- JF_URL (anonymous)
- JF_URL + JF_USER + JF_PASSWORD (basic auth)
- JF_URL + JF_ACCESS_TOKEN (access token)
You can use them in the workflow as follows:
- uses: jfrog/setup-jfrog-cli@v2
env:
JF_URL: ${{ secrets.JF_URL }}
JF_USER: ${{ secrets.JF_USER }}
JF_PASSWORD: ${{ secrets.JF_PASSWORD }}
# Access token if JF_USER and JF_PASSWORD are not provided
# JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }}
- run: |
jf rt ping
# If both local config(JF_ENV_*) and direct connection details(JF_URL) are provided, the default config will be the local config.
# To make the direct connection details config as the default config use the following command:
jf c use setup-jfrog-cil-server