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.
2 parents 8f2a93d + 8991d22 commit 20d59d8Copy full SHA for 20d59d8
.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