From 1314d10095458a3cf4e22f23eb8b6249a740944e Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Mon, 13 Jan 2020 21:01:50 +0100 Subject: [PATCH] Move GitHub Token to inputs Refs #30 --- action.yml | 4 ++++ entrypoint.sh | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 2fb26e7..8b9b048 100644 --- a/action.yml +++ b/action.yml @@ -21,6 +21,10 @@ inputs: description: Path to git repository required: false default: '.' + github_token: + description: Github Token. Usually this is the value from ${{ secrets.GITHUB_TOKEN }}. Pass a PAT if you need a more powerful token. + required: true + runs: using: 'docker' diff --git a/entrypoint.sh b/entrypoint.sh index 1fe69fa..a1b7ed4 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -36,11 +36,11 @@ _setup_git ( ) { cat <<- EOF > $HOME/.netrc machine github.com login $GITHUB_ACTOR - password $GITHUB_TOKEN + password $INPUT_GITHUB_TOKEN machine api.github.com login $GITHUB_ACTOR - password $GITHUB_TOKEN + password $INPUT_GITHUB_TOKEN EOF chmod 600 $HOME/.netrc