diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml index ff74fe7..4e28568 100644 --- a/.forgejo/workflows/build.yaml +++ b/.forgejo/workflows/build.yaml @@ -82,7 +82,11 @@ jobs: git config --global credential.helper '!f() { printf "%s\\n" "username=forgejo-actions"; printf "%s\\n" "password=$GITOPS_TOKEN"; }; f' GITOPS_DIR=$(mktemp -d) - git clone "$GITOPS_REPO" "$GITOPS_DIR" + # -b main: this repo's server-side HEAD symref is broken (returns + # "remote HEAD refers to nonexistent ref" on a plain clone even + # though refs/heads/main exists) - an explicit branch bypasses + # HEAD resolution entirely instead of relying on it. + git clone -b main "$GITOPS_REPO" "$GITOPS_DIR" cd "$GITOPS_DIR" # release-patch.yaml carries a Flux $imagepolicy marker comment on