Skip to content

Commit 76392f0

Browse files
committed
Mirror master and main
In preparation for eventually switching over to `main`, let's synchronize the historical and the designated future main branch. This follows the excellent advice from https://github.com/chancancode/branch-rename/#gradual-migration Signed-off-by: Johannes Schindelin <[email protected]>
1 parent e3179a7 commit 76392f0

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Mirror "master" and "main" branches
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- main
7+
8+
jobs:
9+
mirror:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Partial clone
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 }} .
16+
- name: Push
17+
run: |
18+
git config http.https://github.com/.extraheader "Authorization: Basic $(echo -n x-access-token:${{ github.token }} | base64 --wrap=0)"
19+
git push origin HEAD:master HEAD:main

0 commit comments

Comments
 (0)