From ad002663a657328eccc58fafa057e594b64d1f84 Mon Sep 17 00:00:00 2001 From: Melorise <0d00@0721.hk> Date: Thu, 27 Aug 2026 11:16:27 +0800 Subject: [PATCH] fix: only clone target branch --- .github/workflows/mirror-nixpkgs.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/mirror-nixpkgs.yml b/.github/workflows/mirror-nixpkgs.yml index e7de73d78..0a2c3c231 100644 --- a/.github/workflows/mirror-nixpkgs.yml +++ b/.github/workflows/mirror-nixpkgs.yml @@ -20,7 +20,10 @@ jobs: set -euo pipefail : "${NIX_BRANCH_TOKEN:?Set the NIX_BRANCH_TOKEN repository secret.}" - git clone --bare "https://github.com/NixOS/nixpkgs.git" nixpkgs.git + git clone --bare --single-branch --branch nixos-26.05 \ + "https://github.com/NixOS/nixpkgs.git" nixpkgs.git + git -C nixpkgs.git fetch origin \ + "refs/heads/nixos-unstable:refs/heads/nixos-unstable" git -C nixpkgs.git remote add target \ "https://x-access-token:${NIX_BRANCH_TOKEN}@github.com/${TARGET_REPOSITORY}.git"