Skip to content
GitHub Action for interacting with npm
Shell HCL Dockerfile Ruby
Branch: master
Clone or download
#2 Compare This branch is even with stingaa:master.
6 authors Initial commit
Co-authored-by: Steve Winton <stevewinton@gmail.com>
Co-authored-by: Nick Van Wiggeren <nickvanw@github.com>
Co-authored-by: Steve Winton <swinton@users.noreply.github.com>
Co-authored-by: Max Schoening <max@max.wtf>
Co-authored-by: Nick Van Wiggeren <nickvanw@users.noreply.github.com>
Co-authored-by: Brandon Keepers <bkeepers@github.com>
Co-authored-by: Greg Orzell <gorzell@users.noreply.github.com>
Co-authored-by: Greg Orzell <gorzell@github.com>
Latest commit 94e6933 Oct 16, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Initial commit Oct 16, 2018
script Initial commit Oct 16, 2018
test Initial commit Oct 16, 2018
.dockerignore Initial commit Oct 16, 2018
Brewfile Initial commit Oct 16, 2018
Dockerfile Initial commit Oct 16, 2018
LICENSE Initial commit Oct 16, 2018
README.md Initial commit Oct 16, 2018
THIRD_PARTY_NOTICE.md Initial commit Oct 16, 2018
entrypoint.sh Initial commit Oct 16, 2018

README.md

GitHub Actions for NPM

This Action for npm enables arbitrary actions with the npm command-line client, including testing packages and publishing to a registry.

Usage

An example workflow to build, test, and publish an npm package to the default public registry follows:

workflow "Build, Test, and Publish" {
  on = "push"
  resolves = ["Publish"]
}

action "Build" {
  uses = "actions/npm@master"
  args = "install"
}

action "Test" {
  needs = "Build"
  uses = "actions/npm@master"
  args = "test"
}

action "Publish" {
  needs = "Test"
  uses = "actions/npm@master"
  args = "publish --access public"
  secrets = ["NPM_AUTH_TOKEN"]
}

Secrets

  • NPM_AUTH_TOKEN - Optional. The token to use for authentication with the npm registry. Required for npm publish (more info)

Environment variables

  • NPM_REGISTRY_URL - Optional. To specify a registry to authenticate with. Defaults to registry.npmjs.org
  • NPM_CONFIG_USERCONFIG - Optional. To specify a non-default per-user configuration file. Defaults to $HOME/.npmrc (more info)

Example

To authenticate with, and publish to, a registry other than registry.npmjs.org:

action "Publish" {
  uses = "actions/npm@master"
  args = "publish --access public"
  env = {
    NPM_REGISTRY_URL = "someOtherRegistry.someDomain.net"
  }
  secrets = ["NPM_TOKEN"]
}

License

The Dockerfile and associated scripts and documentation in this project are released under the MIT License.

Container images built with this project include third party materials. See THIRD_PARTY_NOTICE.md for details.

You can’t perform that action at this time.