diff --git a/action.yaml b/action.yaml index 0d0ac26..7734bbb 100644 --- a/action.yaml +++ b/action.yaml @@ -5,7 +5,7 @@ branding: color: purple inputs: ruleset: - description: 'file path or url that links to a ruleset config file' + description: 'Base64 encoded ruleset config file or url to ruleset config file.' required: true gh_token: description: 'Github token that has permissions to create labels, issues and has read rights to view files.' diff --git a/bin/loop.sh b/bin/loop.sh index 4c08586..5968142 100755 --- a/bin/loop.sh +++ b/bin/loop.sh @@ -13,7 +13,7 @@ function check_target_repos { echo "Checking repository: $i" echo "Using ruleset parameter: $1" /app/repolinter/bin/repolinter.js lint \ - "$1" "$RULESET" \ + "$1" \ -g https://x-access-token:"$GITHUB_TOKEN"@github.com/"${i}" done } @@ -23,8 +23,8 @@ regex='(https?)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]' if [[ $RULESET =~ $regex ]] then echo "Link valid" - check_target_repos "--rulesetUrl" + check_target_repos "--rulesetUrl ""$RULESET""" else - echo "No link, assuming file path" - check_target_repos "-r" + echo "No link, assuming base64 encoded file" + check_target_repos "-c ""$RULESET""" fi