Skip to content

Update file path.

Update file path. #15

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
test-package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm ci
# Step to retrieve the bearer token
- name: Retrieve bearer token
id: get_bearer_token
run: |
response=$(curl -X POST ${{secrets.OKTA_ACCESS_TOKEN_URL}}/connect/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=${{secrets.OKTA_CLIENT_ID}}&client_secret=${{secrets.OKTA_CLIENT_SECRET}}")
token=$(echo $response | jq -r '.access_token')
echo "BEARER_TOKEN=${token}" >> $GITHUB_ENV
# Use the bearer token as an environment variable in the npm test command
- name: Run npm test with bearer token
run: npm run test
env:
BEARER_TOKEN: ${{ env.BEARER_TOKEN }}