Skip to content

Update build-publish.yml #43

Update build-publish.yml

Update build-publish.yml #43

Workflow file for this run

name: "JFrog-GitHubb NPM Publish OIDC Integration"
on: push
# This is required as per
# https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-cloud-providers#adding-permissions-settings
permissions:
id-token: write
jobs:
build:
runs-on: ubuntu-latest
env:
OIDC_AUDIENCE: 'jfrog-github'
OIDC_PROVIDER: 'test1322556'
PLATFORM_REPO: 'npm'
defaults:
run:
working-directory: ./package
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Print Specific Environment Variables
run: |
echo "OIDC_AUDIENCE is set to: ${{ env.OIDC_AUDIENCE }}"
echo "OIDC_PROVIDER is set to: ${{ env.OIDC_PROVIDER }}"
echo "JFrog URL is set to: ${{ secrets.JF_URL }}" # Caution: This will print the JFrog URL
- name: Print All Environment Variables
run: printenv
- name: Setup Node npm
uses: actions/setup-node@v3
- name: Setup JFrog CLI
uses: jfrog/setup-jfrog-cli@v4
env:
JF_URL: ${{ secrets.JF_URL }}
with:
oidc-provider-name: ${{ env.OIDC_PROVIDER }}
oidc-audience: ${{ env.OIDC_AUDIENCE }}
- name: Test JFrog Connection
run: |
# Enable debug logging
export DEBUG=1
export JFROG_CLI_LOG_LEVEL=DEBUG
# Test connection
jf rt ping
jf docker pull ${{ secrets.JF_URL }}/bassel-sign1/artifactory-pro:latest