mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2026-02-04 21:31:11 +00:00
Create main.yml with OIDC token
Signed-off-by: nirpel-sys <nirpel@jfrog.com>
This commit is contained in:
parent
ab1d5364a0
commit
b76ce3f612
1 changed files with 23 additions and 0 deletions
23
.github/workflows/main.yml
vendored
Normal file
23
.github/workflows/main.yml
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
jobs:
|
||||
build-and-publish:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write # MANDATORY: Required to request the JWT from GitHub
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Setup JFrog CLI using OIDC instead of Secrets
|
||||
- name: Set up JFrog CLI
|
||||
uses: jfrog/setup-jfrog-cli@v4
|
||||
env:
|
||||
JF_URL: ${{ secrets.JF_URL }} # Still need the URL, but no token needed!
|
||||
with:
|
||||
version: latest
|
||||
oidc-provider-name: github-oidc-provider # Must match name in JFrog
|
||||
oidc-audience: jfrog-github # Must match audience in JFrog
|
||||
|
||||
- name: Run JFrog Command
|
||||
run: jf rt ping # This now works without any manual JF_ACCESS_TOKEN
|
||||
Loading…
Add table
Add a link
Reference in a new issue