mirror of
https://github.com/git-for-windows/git.git
synced 2026-04-30 06:58:55 -05:00
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 <johannes.schindelin@gmx.de>
This commit is contained in:
19
.github/workflows/mirror-master-and-main.yml
vendored
Normal file
19
.github/workflows/mirror-master-and-main.yml
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
name: Mirror "master" and "main" branches
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
|
||||
jobs:
|
||||
mirror:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Partial clone
|
||||
env:
|
||||
ref: ${{ github.event.ref }}
|
||||
run: git clone --bare --depth=100 --single-branch --branch ${ref#refs/heads/} --filter=blob:none ${{ github.event.repository.html_url }} .
|
||||
- name: Push
|
||||
run: |
|
||||
git config http.https://github.com/.extraheader "Authorization: Basic $(echo -n x-access-token:${{ github.token }} | base64 --wrap=0)"
|
||||
git push origin HEAD:master HEAD:main
|
||||
Reference in New Issue
Block a user