Skip to content

Commit

Permalink
use GITHUB_REPOSITORY (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentsimon committed Jan 31, 2022
1 parent e78825b commit 6cc0399
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions entrypoint.sh
Expand Up @@ -30,7 +30,6 @@ export SCORECARD_POLICY_FILE="/policy.yml" # Copied at docker image creation.
export SCORECARD_RESULTS_FILE="$INPUT_RESULTS_FILE"
export SCORECARD_RESULTS_FORMAT="$INPUT_RESULTS_FORMAT"
export SCORECARD_PUBLISH_RESULTS="$INPUT_PUBLISH_RESULTS"
export SCORECARD_REPOSITORY="$(jq -r '.repository.full_name' $GITHUB_EVENT_PATH)"
export SCORECARD_BIN="/scorecard"
export ENABLED_CHECKS=

Expand All @@ -48,7 +47,7 @@ export ENABLED_CHECKS=
#
# Boolean inputs are strings https://github.com/actions/runner/issues/1483.
# ===============================================================================
curl -s -H "Authorization: Bearer $GITHUB_AUTH_TOKEN" https://api.github.com/repos/$SCORECARD_REPOSITORY > repo_info.json
curl -s -H "Authorization: Bearer $GITHUB_AUTH_TOKEN" https://api.github.com/repos/$GITHUB_REPOSITORY > repo_info.json
export SCORECARD_PRIVATE_REPOSITORY="$(cat repo_info.json | jq -r '.private')"
export SCORECARD_DEFAULT_BRANCH="refs/heads/$(cat repo_info.json | jq -r '.default_branch')"
rm repo_info.json
Expand All @@ -66,7 +65,7 @@ fi
echo "Event file: $GITHUB_EVENT_PATH"
echo "Event name: $GITHUB_EVENT_NAME"
echo "Ref: $GITHUB_REF"
echo "Repository: $SCORECARD_REPOSITORY"
echo "Repository: $GITHUB_REPOSITORY"
echo "Private repository: $SCORECARD_PRIVATE_REPOSITORY"
echo "Publication enabled: $SCORECARD_PUBLISH_RESULTS"
echo "Format: $SCORECARD_RESULTS_FORMAT"
Expand Down

0 comments on commit 6cc0399

Please sign in to comment.