fix(action): small typos and weird stuff
Why is it not downloading the previous report?
This commit is contained in:
parent
08d9598c26
commit
c3362d4650
3 changed files with 8 additions and 9 deletions
|
@ -82,9 +82,8 @@ runs:
|
||||||
# USAGE: has_report <REPORT_URL>
|
# USAGE: has_report <REPORT_URL>
|
||||||
has_report() {
|
has_report() {
|
||||||
http_code=$(curl -X 'GET' -o /dev/null --silent -Iw '%{http_code}' \
|
http_code=$(curl -X 'GET' -o /dev/null --silent -Iw '%{http_code}' \
|
||||||
-H "Authorization: token $GITHUB_TOKEN" \
|
"$1" -H "Authorization: token $GITHUB_TOKEN")
|
||||||
"$1")
|
log "Got code $http_code for $1"
|
||||||
log "Got code $http_code for $url"
|
|
||||||
test "$http_code" = '200'
|
test "$http_code" = '200'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,8 +95,8 @@ runs:
|
||||||
if has_report "$report_url"; then
|
if has_report "$report_url"; then
|
||||||
log 'Found previous report, downloading...'
|
log 'Found previous report, downloading...'
|
||||||
curl -X 'GET' \
|
curl -X 'GET' \
|
||||||
-H "Authorization: token $GITHUB_TOKEN" \
|
"$report_url" \
|
||||||
"$url/artifacts/$ARTIFACT_NAME" |
|
-H "Authorization: token $GITHUB_TOKEN" |
|
||||||
gunzip > old-report.json
|
gunzip > old-report.json
|
||||||
log "Reporting on sizes and comparing to sizes in $HEAD_BRANCH"
|
log "Reporting on sizes and comparing to sizes in $HEAD_BRANCH"
|
||||||
"$GITHUB_ACTION_PATH/comment_on_pr.sh" report.json old-report.json
|
"$GITHUB_ACTION_PATH/comment_on_pr.sh" report.json old-report.json
|
||||||
|
|
|
@ -126,12 +126,12 @@ log "Expected PR URL: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/pulls/$pr_number"
|
||||||
log 'Generating comment body'
|
log 'Generating comment body'
|
||||||
comment=$(markdown_from_report "$@")
|
comment=$(markdown_from_report "$@")
|
||||||
|
|
||||||
group 'Comment Data:'
|
group 'Comment Data'
|
||||||
log "$comment"
|
log "$comment"
|
||||||
endgroup
|
endgroup
|
||||||
|
|
||||||
data=$(echo '{}' | jq --arg comment "$comment" '.body=$comment')
|
data=$(echo '{}' | jq --arg comment "$comment" '.body=$comment')
|
||||||
group 'Request data:'
|
group 'Request data'
|
||||||
log "$data"
|
log "$data"
|
||||||
endgroup
|
endgroup
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ packages=$(
|
||||||
$flake_info
|
$flake_info
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
group 'Packages:'
|
group 'Show Packages'
|
||||||
log "$packages"
|
log "$packages"
|
||||||
endgroup
|
endgroup
|
||||||
configurations=$(
|
configurations=$(
|
||||||
|
@ -22,7 +22,7 @@ configurations=$(
|
||||||
$flake_info
|
$flake_info
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
group 'NixOS Configurations:'
|
group 'Show NixOS Configurations'
|
||||||
log "$configurations"
|
log "$configurations"
|
||||||
endgroup
|
endgroup
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue