Compare commits
1 commit
87a8d87143
...
5d99a468a1
Author | SHA1 | Date | |
---|---|---|---|
5d99a468a1 |
1 changed files with 2 additions and 6 deletions
|
@ -1,10 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
package_size_table() {
|
package_size_table() {
|
||||||
packages=$(nix flake show --json 2>/dev/null | jq --raw-output '.packages."x86_64-linux" | ".#" + keys[]')
|
packages=$(nix flake show --json 2>/dev/null | jq --raw-output '.packages."x86_64-linux" | ".#" + keys[]')
|
||||||
echo 'Building packages' >&2
|
|
||||||
# we want to split the words as each of them is a different installable
|
# we want to split the words as each of them is a different installable
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
nix build $packages
|
nix build $packages
|
||||||
|
@ -20,7 +17,7 @@ package_size_table() {
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "${CI-false}" = "true" ]; then
|
if [ "$CI" = "true" ]; then
|
||||||
pr_number=$(curl -X 'GET' \
|
pr_number=$(curl -X 'GET' \
|
||||||
"$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/pulls?state=open&sort=recentupdate" \
|
"$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/pulls?state=open&sort=recentupdate" \
|
||||||
-H 'accept: application/json' |
|
-H 'accept: application/json' |
|
||||||
|
@ -45,9 +42,8 @@ if [ "${CI-false}" = "true" ]; then
|
||||||
data=$(echo '{}' | jq --arg comment "$comment" '.body=$comment')
|
data=$(echo '{}' | jq --arg comment "$comment" '.body=$comment')
|
||||||
echo "$data"
|
echo "$data"
|
||||||
curl -o - -v -X 'POST' \
|
curl -o - -v -X 'POST' \
|
||||||
"$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/issues/$pr_number/comments" \
|
"$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/issues/$pr_number/comments?token=$GITHUB_TOKEN" \
|
||||||
-H 'accept: application/json' \
|
-H 'accept: application/json' \
|
||||||
-H "Authorization: token $GITHUB_TOKEN" \
|
|
||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
-d "$data"
|
-d "$data"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue