Skip to content

Commit a98b073

Browse files
committed
fixup! Mirror master and main
The workflow needs to be adjusted so that the just-pushed branch is cloned (otherwise it is always the default branch that is cloned, even if in the case that branch is stale). Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 3c88881 commit a98b073

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/mirror-master-and-main.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Partial clone
13-
run: git clone --bare --depth=100 --single-branch --filter=blob:none ${{ github.event.repository.html_url }} .
13+
env:
14+
ref: ${{ github.event.ref }}
15+
run: git clone --bare --depth=100 --single-branch --branch ${ref#refs/heads/} --filter=blob:none ${{ github.event.repository.html_url }} .
1416
- name: Push
1517
run: |
1618
git config http.https://github.com/.extraheader "Authorization: Basic $(echo -n x-access-token:${{ github.token }} | base64 --wrap=0)"

0 commit comments

Comments
 (0)