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:
|
schedule:
|
||||||
- cron: '@hourly'
|
- cron: '@hourly'
|
||||||
|
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
mirror:
|
mirror:
|
||||||
name: Pull from upstream
|
name: Pull from upstream
|
||||||
|
@ -9,15 +11,15 @@ jobs:
|
||||||
container:
|
container:
|
||||||
image: 'docker.io/node:20-bookworm'
|
image: 'docker.io/node:20-bookworm'
|
||||||
steps:
|
steps:
|
||||||
- name: git mirror branches {v*/,}main & tags
|
- name: git mirror branches {v*/,}* & tags
|
||||||
run: |
|
run: |
|
||||||
git init --bare .
|
git init --bare .
|
||||||
git remote add origin https://github.com/dotnet/installer
|
git remote add origin https://github.com/dotnet/installer
|
||||||
git fetch origin refs/heads/main:refs/mirror/main
|
git fetch origin refs/heads/*:refs/mirror/*
|
||||||
git ls-remote origin refs/heads/v*/main | while read sha full_ref ; do
|
git ls-remote origin refs/heads/v*/* | while read sha full_ref ; do
|
||||||
ref=${full_ref#refs/heads/}
|
ref=${full_ref#refs/heads/}
|
||||||
git fetch origin $full_ref:refs/mirror/$ref
|
git fetch origin $full_ref:refs/mirror/$ref
|
||||||
tag=${ref%/main}
|
tag=${ref}
|
||||||
git fetch origin refs/tags/${tag}*:refs/mirror-tags/${tag}*
|
git fetch origin refs/tags/${tag}*:refs/mirror-tags/${tag}*
|
||||||
done
|
done
|
||||||
if test "${{ vars.TEST }}" != true ; then
|
if test "${{ vars.TEST }}" != true ; then
|
||||||
|
|
Loading…
Reference in a new issue