Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Commit

Permalink
feat: add ability to pass gh registry token (#4)
Browse files Browse the repository at this point in the history
* chore: set GH package registry token optionally

* docs: update documentation to reflect added param
  • Loading branch information
cody-hoffman authored Jan 30, 2020
1 parent afdb369 commit 8ed2396
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ inputs:
actions_comment:
description: "Whether or not to comment on pull requests."
default: false
github_package_registry_token:
description: "Github package registry token to install dependencies outside of npm"
default: ""
runs:
using: "docker"
image: "./Dockerfile"
4 changes: 4 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ function installAwsSam(){
}

function runSam(){
if [ "${INPUT_GITHUB_PACKAGE_REGISTRY_TOKEN}" == "" ]; then
echo "//npm.pkg.github.com/:_authToken=${INPUT_GITHUB_PACKAGE_REGISTRY_TOKEN}" > ~/.npmrc
fi

echo "Run sam ${INPUT_SAM_COMMAND}"
output=$(sam ${INPUT_SAM_COMMAND} 2>&1)
exitCode=${?}
Expand Down

0 comments on commit 8ed2396

Please sign in to comment.