diff --git a/.forgejo/workflows/check.yml b/.forgejo/workflows/check.yml deleted file mode 100644 index f736669..0000000 --- a/.forgejo/workflows/check.yml +++ /dev/null @@ -1,23 +0,0 @@ -on: - push: -jobs: - check: - runs-on: nixos - steps: - - uses: "https://code.forgejo.org/actions/checkout@v4" - - run: nix --version - - run: nix flake check --keep-going --verbose - build: - runs-on: nixos - strategy: - matrix: - target: - - audiomenu - - docs - - jpassmenu - - nixosConfigurations.vm.config.system.build.toplevel - - nvim - steps: - - uses: "https://code.forgejo.org/actions/checkout@v4" - - run: nix --version - - run: nix build --print-build-logs '.#${{ matrix.target }}' diff --git a/ci-scripts/report-size.sh b/ci-scripts/report-size.sh index c573541..77533d7 100755 --- a/ci-scripts/report-size.sh +++ b/ci-scripts/report-size.sh @@ -18,21 +18,23 @@ package_size_table() { } if [ "$CI" = "true" ]; then + pr_number=$(curl -X 'GET' \ + "$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') + echo "Retrieved index: $pr_number" + echo "Expected PR URL: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/pulls/$pr_number" + echo "Logging in to $GITHUB_SERVER_URL with default token" tea login add --url "$GITHUB_SERVER_URL" --token "$GITHUB_TOKEN" - echo "Retrieving PR index for $GITHUB_HEAD_REF" - tea pulls -f index,head -o simple - pr_index=$(tea pulls -f index,head -o simple | grep "$GITHUB_HEAD_REF" | head -n1 | cut -d' ' -f 1) - echo "Retrieved index: $pr_index" - echo "Expected PR URL: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/pulls/$pr_index" - tea comment "$pr_index" "$( + tea comment "$pr_number" "$( cat <<-EOF ### NixOS Configurations sizes - + TODO - + ### Package sizes - + $(package_size_table) EOF )"