GitHub Action
Validate Nerdpack Action
v1.0.5
Latest version
A GitHub Action to check for the presence of our standard open source files, catalog files (if applicable), and package script commands.
Key | Required | Default | Description |
---|---|---|---|
files |
no | - | Comma-separated list of files to validate existence for. These are appended to default list of files, unless override flag is set to true. |
path |
no | - | Sets the directory the Action will run from. |
override |
no | false | By default, the files option will append to the default list of files being checked. This flag allows overwriting the whole list. |
The following example shows how to use the valiate-nerdpace-action to ensure all Nerdpack standards are adhered to in a Pull Request.
name: "Build and Validate Nerdpack"
on:
pull_request:
branches:
- main
jobs:
validate-nerdpack:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: "Validate Nerdpack"
uses: newrelic/validate-nerdpack-action@v1
with:
files: "package.json, LICENSE, README.md, foo, bar"
# Now run nr1 nerdpack:validate to ensure nerdpack is able to be published
- name: Install NR1 CLI
run: |
curl -s https://cli.nr-ext.net/installer.sh | sudo bash
- name: Validate Nerdpack Schema
run: |
nr1 nerdpack:validate
Add files
, path
, and override
configuration.
name: "Build and Validate Nerdpack"
on:
pull_request:
branches:
- main
jobs:
validate-nerdpack:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: "Validate Nerdpack"
uses: newrelic/validate-nerdpack-action@v1
with:
files: "package.json, LICENSE, README.md, foo, bar"
override: true
path: ./apps/nr1-browser-analyzer # set Action to run from base Nerdpack directory
# Now run nr1 nerdpack:validate to ensure nerdpack is able to be published
- name: Install NR1 CLI
run: |
curl -s https://cli.nr-ext.net/installer.sh | sudo bash
- name: Validate Nerdpack Schema
run: |
nr1 nerdpack:validate
Validate Nerdpack Action is licensed under the Apache 2.0 License.
This repo also uses source code from third party libraries. Full details on which libraries are used and the terms under which they are licensed can be found in the third party notices document.