diff --git a/.forgejo/workflows/mirror-repository.yml b/.forgejo/workflows/mirror-repository.yml index e3c1cf65c..e52b5e158 100644 --- a/.forgejo/workflows/mirror-repository.yml +++ b/.forgejo/workflows/mirror-repository.yml @@ -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