Skip to content

Commit b0cd375

Browse files
author
github-actions
committed
build: 397e226edb9c55d49e67f86ad7e6431164b16405
1 parent e94e9f7 commit b0cd375

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

.github/workflows/reusable.yml

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@ on:
1010
type: string
1111

1212
jobs:
13-
build:
13+
distribute_job:
1414
if: (contains(github.event.head_commit.message, 'build') && !contains(github.event.head_commit.message, 'skip ci'))
15-
name: Build
15+
name: distribute-job
1616
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
exchange: ['bingx', 'bitget', 'bitmart', 'bitmex', 'bybit', 'coinex', 'cryptocom', 'gate', 'hashkey', 'htx', 'hyperliquid', 'kucoin', 'kucoinfutures', 'mexc', 'okx', 'woo', 'woofipro']
1720
steps:
1821
- name: Checkout code
1922
uses: actions/checkout@v4
@@ -22,7 +25,7 @@ jobs:
2225
persist-credentials: false
2326

2427
- name: Push to another repo (approach A)
25-
if: (contains(github.event.head_commit.message, 'BUILD_A'))
28+
if: (!contains(github.event.head_commit.message, 'BUILD_WITH_REMOTE'))
2629
run: |
2730
TEMP_DIR=$(mktemp -d)
2831
TEMP_DIR_GIT="$TEMP_DIR/python-${{ inputs.exchange_name }}"
@@ -35,15 +38,15 @@ jobs:
3538
git commit -m "build: ${{ github.sha }}"
3639
git push origin main --force
3740
38-
- name: Push to another repo (approach B)
39-
if: (!contains(github.event.head_commit.message, 'BUILD_B'))
40-
run: |
41-
git config user.name github-actions
42-
git config user.email [email protected]
43-
git remote add prod https://x-access-token:${{ secrets.API_TOKEN_FOR_CCXT_SINGLE_EXCHANGES }}@github.com/ccxt/python-${{ inputs.exchange_name }}.git
44-
git config pull.rebase false
45-
git fetch --unshallow origin
46-
git pull --allow-unrelated-histories prod main || echo "Git pull failed"
47-
git push prod main --force
41+
# - name: Push to another repo (approach B)
42+
# if: (contains(github.event.head_commit.message, 'BUILD_WITH_REMOTE'))
43+
# run: |
44+
# git config user.name github-actions
45+
# git config user.email [email protected]
46+
# git remote add prod https://x-access-token:${{ secrets.API_TOKEN_FOR_CCXT_SINGLE_EXCHANGES }}@github.com/ccxt/python-${{ inputs.exchange_name }}.git
47+
# git config pull.rebase false
48+
# git fetch --unshallow origin
49+
# git pull --allow-unrelated-histories prod main || echo "Git pull failed"
50+
# git push prod main --force
4851

4952

0 commit comments

Comments
 (0)