More logging.

This commit is contained in:
2025-07-01 14:06:28 -07:00
parent 58768466b6
commit 9ffed504b7
2 changed files with 17 additions and 2 deletions

View File

@@ -34,6 +34,11 @@ runs:
- name: "Build route." - name: "Build route."
id: route id: route
run: | run: |
NAME="GitHub NuGet Query"
echo "::group::$NAME - Inputs"
echo "${{ toJSON(inputs) }}"
echo "::endgroup::"
# GitHub # GitHub
#ROUTE="/_registry/nuget/${{ inputs.organization }}/query?" #ROUTE="/_registry/nuget/${{ inputs.organization }}/query?"
# Gitea # Gitea

View File

@@ -26,6 +26,11 @@ runs:
- name: "Build and run query." - name: "Build and run query."
id: query id: query
run: | run: |
NAME="GitHub Query"
echo "::group::$NAME - Inputs"
echo "${{ toJSON(inputs) }}"
echo "::endgroup::"
URL_ROOT="${{ inputs.url }}" URL_ROOT="${{ inputs.url }}"
# Remove any trailing slash from the url root # Remove any trailing slash from the url root
URL_ROOT=${URL_ROOT%/} URL_ROOT=${URL_ROOT%/}
@@ -41,14 +46,19 @@ runs:
if [[ -n "$TOKEN" ]]; then if [[ -n "$TOKEN" ]]; then
QUERY="$QUERY -H \"Authorization: token $TOKEN\"" QUERY="$QUERY -H \"Authorization: token $TOKEN\""
fi fi
OUTPUT=$(eval "$QUERY") OUTPUT=$(eval "$QUERY")
RESULT=$? RESULT=$?
if [[ -n "$OUTPUT" ]]; then if [[ -n "$OUTPUT" ]]; then
echo "console<<EOF" >> "$GITHUB_OUTPUT" echo "console<<EOF" >> "$GITHUB_OUTPUT"
echo "$OUTPUT" >> "$GITHUB_OUTPUT" echo "$OUTPUT" >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT" echo "EOF" >> "$GITHUB_OUTPUT"
fi fi
echo "::group::$NAME - Outputs"
cat "$GITHUB_OUTPUT"
echo "::endgroup::"
exit $RESULT exit $RESULT
shell: bash shell: bash