Skip to content

Commit

Permalink
+
Browse files Browse the repository at this point in the history
  • Loading branch information
kartaris authored Nov 28, 2024
1 parent cd05fb0 commit e2dbab8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions src/add-to-wiki
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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}"
Expand Down

0 comments on commit e2dbab8

Please sign in to comment.