Compare commits
1 commit
7c70c50922
...
44a53b78e0
Author | SHA1 | Date | |
---|---|---|---|
44a53b78e0 |
2 changed files with 32 additions and 11 deletions
23
.forgejo/workflows/check.yml
Normal file
23
.forgejo/workflows/check.yml
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
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 }}'
|
|
@ -18,16 +18,14 @@ package_size_table() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$CI" = "true" ]; then
|
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"
|
echo "Logging in to $GITHUB_SERVER_URL with default token"
|
||||||
tea login add --url "$GITHUB_SERVER_URL" --token "$GITHUB_TOKEN"
|
tea login add --url "$GITHUB_SERVER_URL" --token "$GITHUB_TOKEN"
|
||||||
tea comment "$pr_number" "$(
|
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" "$(
|
||||||
cat <<-EOF
|
cat <<-EOF
|
||||||
### NixOS Configurations sizes
|
### NixOS Configurations sizes
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue