mirror-repository: fetch all
This commit is contained in:
parent
7795fb0f52
commit
3f01134419
1 changed files with 6 additions and 4 deletions
|
@ -2,6 +2,8 @@ on:
|
|||
schedule:
|
||||
- cron: '@hourly'
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
mirror:
|
||||
name: Pull from upstream
|
||||
|
@ -9,15 +11,15 @@ jobs:
|
|||
container:
|
||||
image: 'docker.io/node:20-bookworm'
|
||||
steps:
|
||||
- name: git mirror branches {v*/,}main & tags
|
||||
- name: git mirror branches {v*/,}* & tags
|
||||
run: |
|
||||
git init --bare .
|
||||
git remote add origin https://github.com/dotnet/installer
|
||||
git fetch origin refs/heads/main:refs/mirror/main
|
||||
git ls-remote origin refs/heads/v*/main | while read sha full_ref ; do
|
||||
git fetch origin refs/heads/*:refs/mirror/*
|
||||
git ls-remote origin refs/heads/v*/* | while read sha full_ref ; do
|
||||
ref=${full_ref#refs/heads/}
|
||||
git fetch origin $full_ref:refs/mirror/$ref
|
||||
tag=${ref%/main}
|
||||
tag=${ref}
|
||||
git fetch origin refs/tags/${tag}*:refs/mirror-tags/${tag}*
|
||||
done
|
||||
if test "${{ vars.TEST }}" != true ; then
|
||||
|
|
Loading…
Reference in a new issue