diff --git a/action.yml b/action.yml index 294587d..74d2b2f 100644 --- a/action.yml +++ b/action.yml @@ -23,6 +23,10 @@ inputs: A GitHub token to write comments and write the badge to the wiki (``github.token``) required: true + GITHUB_WIKI: + description: > + Wiki repository clone url + required: true COVERAGE_FILE: description: > Path and filename of the coverage XML file to analyze. @@ -64,6 +68,7 @@ runs: image: Dockerfile env: GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }} + GITHUB_WIKI: ${{ inputs.GITHUB_WIKI }} COVERAGE_FILE: ${{ inputs.COVERAGE_FILE }} COMMENT_TEMPLATE: ${{ inputs.COMMENT_TEMPLATE }} DIFF_COVER_ARGS: ${{ inputs.DIFF_COVER_ARGS }} diff --git a/src/add-to-wiki b/src/add-to-wiki index bc7c28c..ea6b990 100755 --- a/src/add-to-wiki +++ b/src/add-to-wiki @@ -2,7 +2,7 @@ # Usage $0 {owner/repo} {filename} {commit_message} # Stores the content of stdin in a file named {filename} in the wiki of # the provided repo -# Reads envvar GITHUB_TOKEN +# Reads envvar GITHUB_WIKI set -eux @@ -13,7 +13,7 @@ commit_message="${3}" dir="$(mktemp -d)" cd $dir -git clone "https://x-access-token:${GITHUB_TOKEN}@github.com/${repo_name}.wiki.git" . +git clone "${GITHUB_WIKI}" . echo $stdin > "${filename}" git add "${filename}"