fix(action): small typos and weird stuff

Why is it not downloading the previous report?
This commit is contained in:
Jalil David Salamé Messina 2024-12-18 16:18:13 +01:00
parent 08d9598c26
commit c3362d4650
Signed by: jalil
GPG key ID: F016B9E770737A0B
3 changed files with 8 additions and 9 deletions

View file

@ -82,9 +82,8 @@ runs:
# USAGE: has_report <REPORT_URL>
has_report() {
http_code=$(curl -X 'GET' -o /dev/null --silent -Iw '%{http_code}' \
-H "Authorization: token $GITHUB_TOKEN" \
"$1")
log "Got code $http_code for $url"
"$1" -H "Authorization: token $GITHUB_TOKEN")
log "Got code $http_code for $1"
test "$http_code" = '200'
}
@ -96,8 +95,8 @@ runs:
if has_report "$report_url"; then
log 'Found previous report, downloading...'
curl -X 'GET' \
-H "Authorization: token $GITHUB_TOKEN" \
"$url/artifacts/$ARTIFACT_NAME" |
"$report_url" \
-H "Authorization: token $GITHUB_TOKEN" |
gunzip > old-report.json
log "Reporting on sizes and comparing to sizes in $HEAD_BRANCH"
"$GITHUB_ACTION_PATH/comment_on_pr.sh" report.json old-report.json

View file

@ -126,12 +126,12 @@ log "Expected PR URL: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/pulls/$pr_number"
log 'Generating comment body'
comment=$(markdown_from_report "$@")
group 'Comment Data:'
group 'Comment Data'
log "$comment"
endgroup
data=$(echo '{}' | jq --arg comment "$comment" '.body=$comment')
group 'Request data:'
group 'Request data'
log "$data"
endgroup

View file

@ -14,7 +14,7 @@ packages=$(
$flake_info
EOF
)
group 'Packages:'
group 'Show Packages'
log "$packages"
endgroup
configurations=$(
@ -22,7 +22,7 @@ configurations=$(
$flake_info
EOF
)
group 'NixOS Configurations:'
group 'Show NixOS Configurations'
log "$configurations"
endgroup