Compare commits

..

1 commit

Author SHA1 Message Date
7c70c50922
wip: report package sizes
Some checks failed
/ report-size (pull_request) Failing after 25s
Added as a comment to the current pull request
2024-12-15 11:20:37 +01:00

View file

@ -25,22 +25,19 @@ if [ "$CI" = "true" ]; then
echo "Retrieved index: $pr_number"
echo "Expected PR URL: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/pulls/$pr_number"
comment=$(
echo "Logging in to $GITHUB_SERVER_URL with default token"
tea login add --url "$GITHUB_SERVER_URL" --token "$GITHUB_TOKEN"
tea comment "$pr_number" "$(
cat <<-EOF
### NixOS Configurations sizes
TODO
### Package sizes
$(package_size_table)
EOF
)
echo "Posting comment: $comment"
curl -X 'POST' \
"$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/issues/$pr_number/comments?token=$GITHUB_TOKEN" \
-H 'accept: application/json' \
-d "$(echo '{}' | jq --arg comment "$comment" '.body=$comment')"
)"
else
package_size_table
fi