mirror of
https://github.com/Melorise/nixpkgs.git
synced 2026-11-07 14:39:33 +00:00
fix:no shallow clone
This commit is contained in:
@@ -20,10 +20,11 @@ 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 -C nixpkgs.git remote add target \
|
||||
"https://x-access-token:${NIX_BRANCH_TOKEN}@github.com/${TARGET_REPOSITORY}.git"
|
||||
|
||||
for branch in nixos-26.05 nixos-unstable; do
|
||||
git clone --depth=1 --branch "$branch" \
|
||||
"https://github.com/NixOS/nixpkgs.git" "$branch"
|
||||
git -C "$branch" remote set-url origin \
|
||||
"https://x-access-token:${NIX_BRANCH_TOKEN}@github.com/${TARGET_REPOSITORY}.git"
|
||||
git -C "$branch" push --force origin "HEAD:refs/heads/$branch"
|
||||
git -C nixpkgs.git push --force target \
|
||||
"refs/heads/$branch:refs/heads/$branch"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user