The following example shows a sample GitHub Actions Workflow YAML file that you can use to test OIDC integration in the JFrog Platform. The workflow YAML is used to facilitate OpenID Connect Integration between the JFrog Platform and GitHub Actions by providing configuration details and definitions. You need to create and deploy a workflow YAML in GitHub Actions after you configure OIDC integration in the JFrog Platform.
You can also view a live sample on GitHub.
name: "Setup JFrog CLI OIDC Example"
on: push
permissions:
# This is required for requesting the OIDC token
id-token: write
# This is required for actions/checkout
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup JFrog CLI
uses: jfrog/setup-jfrog-cli@v4
env:
# JFrog platform url (for example: https://acme.jfrog.io)
JF_URL: ${{ vars.JF_URL }}
with:
# Name of the OIDC provider as specified on the OIDC integration page in the JFrog Platform
oidc-provider-name: setup-jfrog-cli
- name: Run JFrog CLI
run: |
# Ping the server
jf rt ping
# Collect environment variables for the build
jf rt bce
# Collect VCS details from git and add them to the build
jf rt bag
# Publish build info
jf rt bp