We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2dfc089 commit 181039cCopy full SHA for 181039c
.github/workflows/sync_cnbc.yml
@@ -0,0 +1,30 @@
1
+name: Sync-To-CNBC
2
+
3
+on:
4
+ push:
5
+ branches:
6
+ - master
7
8
+jobs:
9
+ push-to-mirror:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - name: Clone
13
+ run: |
14
+ git init
15
+ git remote add origin https://github.com/${GITHUB_REPOSITORY}.git
16
+ git fetch --all
17
+ for branch in `git branch -a | grep remotes | grep -v HEAD`; do
18
+ git branch --track ${branch##*/} $branch
19
+ done
20
+ - name: Push to CNBC
21
22
+ remote_repo="https://${CNBC_USERNAME}:${CNBC_PASSWORD}@cnb.cool/tca/tools/${GITHUB_REPOSITORY##*/}.git"
23
+ git remote add cnbc "${remote_repo}"
24
+ git show-ref # debug
25
+ git branch --verbose
26
+ git push --all cnbc
27
+ git push --tags cnbc
28
+ env:
29
+ CNBC_USERNAME: ${{ secrets.CNBC_USERNAME }}
30
+ CNBC_PASSWORD: ${{ secrets.CNBC_PASSWORD }}
0 commit comments