We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e3179a7 commit 76392f0Copy full SHA for 76392f0
.github/workflows/mirror-master-and-main.yml
@@ -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