spring-petclinic/.github/workflows/main.yml
nirpel-sys f50fa2fd99
Update main.yml with bp command to RT
Signed-off-by: nirpel-sys <nirpel@jfrog.com>
2026-01-20 12:03:31 +02:00

38 lines
1.4 KiB
YAML

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
# 1. Configure the build tool (Example for a Node.js project)
- name: Configure NPM
run: |
jf npm-config --repo-resolve=npm-virtual --repo-deploy=npm-local
# 2. Run the build and collect "Build-Info"
# The 'jf' wrapper automatically records dependencies and environment variables
- name: Build and Collect Info
run: |
jf npm install --build-name=petclinic-ci --build-number=${{ github.run_number }}
jf npm publish --build-name=petclinic-ci --build-number=${{ github.run_number }}
# 3. Publish the Build-Info to Artifactory
# This is the command that makes the build appear in the "Builds" tab
- name: Publish Build Info
run: |
jf rt bp petclinic-ci ${{ github.run_number }}