ontrack-github-action-client
/
0.1.9
ontrack-github-action-client 0.1.9
Install from the command line:
Learn more about npm packages
$ npm install @nemerosa/ontrack-github-action-client@0.1.9
Install via package.json:
"@nemerosa/ontrack-github-action-client": "0.1.9"
About this version
Reusable low-level Ontrack GraphQL client for GitHub Actions.
npm login --scope=@nemerosa --registry=https://npm.pkg.github.com
npm install @nemerosa/ontrack-github-action-client
const client = require('@nemerosa/ontrack-github-action-client');
// logging: true or false or undefined
const clientEnvironment = client.checkEnvironment(logging);
// Performing the call
const result = client.graphQL(clientEnvironment, query, variables, logging);
The following environment variables must be available:
-
ONTRACK_URL
- the root URL of the Ontrack installation -
ONTRACK_TOKEN
- the Ontrack authentication token
Typically, these will be defined at repository or organization level and exposed to the GitHub Actions workflow:
env:
ONTRACK_URL: "${{ vars.ONTRACK_URL }}"
ONTRACK_TOKEN: "${{ secrets.ONTRACK_TOKEN }}"