fix: something
runner nix smoke / nix label and flake smoke (push) Canceled after 0s

This commit is contained in:
2026-10-03 16:21:28 +00:00
parent be4ea774b2
commit 69ee136349
3 changed files with 76 additions and 7 deletions
@@ -0,0 +1,41 @@
#!/bin/dash
set -eu
. "$LOG_SH"
. "$GITEA_SH"
export GITEA_ADMIN_TOKEN_FILE="$GCR_STATE_DIR/admin-token"
export GCR_GITEA_URL='https://gitea.example.test'
printf 'test-token\n' > "$GITEA_ADMIN_TOKEN_FILE"
gcr_gitea_admin_token() { printf 'test-token'; }
gcr_gitea_curl() {
output=""
previous=""
for arg do
if [ "$previous" = -o ]; then
output="$arg"
fi
previous="$arg"
done
case "$*" in
*'/orgs/yukkop/repos'*)
: > "$output"
printf '404'
;;
*'/users/yukkop/repos'*)
printf '[{"full_name":"yukkop/project"}]\n' > "$output"
printf '200'
;;
*'/orgs/hectic-lab/repos'*)
printf '[{"full_name":"hectic-lab/util.nix"}]\n' > "$output"
printf '200'
;;
*)
return 1
;;
esac
}
test "$(gcr_gitea_list_owner_repos yukkop)" = 'yukkop/project'
test "$(gcr_gitea_list_owner_repos hectic-lab)" = 'hectic-lab/util.nix'