Compare commits

..

1 commit

Author SHA1 Message Date
aae8a6d464
feat(ci): report package sizes
All checks were successful
/ check (push) Successful in 49s
/ build (audiomenu) (push) Successful in 2s
/ build (docs) (push) Successful in 2s
/ build (jpassmenu) (push) Successful in 1s
/ build (nixosConfigurations.vm.config.system.build.toplevel) (push) Successful in 19s
/ build (nvim) (push) Successful in 9s
/ report-size (push) Has been skipped
/ check (pull_request) Has been skipped
/ build (audiomenu) (pull_request) Has been skipped
/ build (docs) (pull_request) Has been skipped
/ build (jpassmenu) (pull_request) Has been skipped
/ build (nixosConfigurations.vm.config.system.build.toplevel) (pull_request) Has been skipped
/ build (nvim) (pull_request) Has been skipped
/ report-size (pull_request) Has been skipped
Added as a comment to the current pull request
2024-12-15 13:24:21 +01:00
2 changed files with 3 additions and 9 deletions

View file

@ -1,9 +1,11 @@
on:
push:
pull_request:
jobs:
check:
runs-on: nixos
needs: build
if: github.event_name == 'push'
steps:
- uses: "https://code.forgejo.org/actions/checkout@v4"
- run: nix --version
@ -28,6 +30,7 @@ jobs:
report-size:
runs-on: nixos
needs: build
if: github.event_name == 'pull_request'
steps:
- uses: "https://git.salame.cl/actions/checkout@v4"
- run: nix --version

View file

@ -73,21 +73,12 @@ if [ "${CI-false}" = "true" ]; then
"$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/pulls?state=open&sort=recentupdate" \
-H 'accept: application/json' |
jq --arg head_ref "$GITHUB_HEAD_REF" '.[] | select(.head.ref == $head_ref) | .number')
if [ -z "$pr_number" ]; then
echo "No PR created for this pull request"
exit 0
fi
echo "Retrieved index: $pr_number" >&2
echo "Expected PR URL: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/pulls/$pr_number" >&2
echo 'Generating comment body' >&2
comment=$(markdown)
echo 'Posting comment:' >&2
echo "$comment" >&2
echo 'Request data:' >&2
data=$(echo '{}' | jq --arg comment "$comment" '.body=$comment')
echo "$data" >&2