File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -46,16 +46,16 @@ jobs:
4646 run : |
4747 set -euo pipefail
4848
49- PREFIX="https://github.com/${REPO}/wiki/"
5049 BADGE_DIR="wiki/${REPO}"
50+ PREFIX="https://github.com/${REPO}/${BADGE_DIR}/"
5151
5252 COMMENT=""
5353
5454 if [ -d "$BADGE_DIR" ]; then
5555 for f in "$BADGE_DIR"/*.svg; do
5656 [ -e "$f" ] || continue
5757 FILE=$(basename "$f")
58- COMMENT+="\n "
58+ COMMENT+="[ ]() "
5959 done
6060 fi
6161
Original file line number Diff line number Diff line change 3030 shell : bash
3131 run : |
3232 set -euo pipefail
33- readarray -t NAMES <<< "${{ inputs.names }}"
34- readarray -t RESULTS <<< "${{ inputs.results }}"
33+ readarray -t NAMES < <(printf '%s\n' "${{ inputs.names }}" | sed '/^[[:space:]]*$/d')
34+ readarray -t RESULTS < <(printf '%s\n' "${{ inputs.results }}" | sed '/^[[:space:]]*$/d')
35+
3536
3637 [ "${#NAMES[@]}" -eq "${#RESULTS[@]}" ] || { echo "names and results lengths differ" >&2; exit 1; }
3738
@@ -44,18 +45,20 @@ runs:
4445 case "$RESULT" in
4546 success) COLOR=green ;;
4647 failure) COLOR=red ;;
47- cancelled) COLOR=gray ;;
48- *) COLOR=gray ;;
48+ cancelled) COLOR=blue ;;
49+ *) COLOR=blue ;;
4950 esac
5051
5152 ENCODED_NAME=$(echo "$NAME" | sed 's/-/--/g')
53+ echo "NAME: $NAME"
5254 BADGE_URL="https://img.shields.io/badge/${ENCODED_NAME}-${RESULT}-${COLOR}.svg"
55+ echo "BADGE_URL: $BADGE_URL"
5356
5457 curl -s -o "wiki/${GITHUB_REPOSITORY}/${NAME}-badge.svg" "$BADGE_URL"
5558 done
5659
5760 - name : Commit and Push to Wiki
58- if : ${{ inputs.push }}
61+ if : ${{ inputs.push == 'true' }}
5962 shell : bash
6063 run : |
6164 cd wiki
You can’t perform that action at this time.
0 commit comments