File tree Expand file tree Collapse file tree 3 files changed +22
-5
lines changed
Expand file tree Collapse file tree 3 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ GITHUB_SHA=$3
77
88# Clone and push to the repo
99TEMP_DIR=$( mktemp -d)
10- TEMP_DIR_GIT=" $TEMP_DIR /python- $EXCHANGE_NAME "
11- git clone https://x-access-token:$API_TOKEN @github.com/ccxt/python- $EXCHANGE_NAME .git $TEMP_DIR_GIT
10+ TEMP_DIR_GIT=" $TEMP_DIR /$EXCHANGE_NAME -python "
11+ git clone https://x-access-token:$API_TOKEN @github.com/ccxt/$EXCHANGE_NAME -python .git $TEMP_DIR_GIT
1212rsync -av --exclude=' .git' ./ $TEMP_DIR_GIT
1313# remove all yml files except remote
1414dir $TEMP_DIR_GIT /.github/workflows/
@@ -17,4 +17,6 @@ cd $TEMP_DIR_GIT
1717git config user.name github-actions
1818git config user.email
[email protected] 1919git add .
20+ rm -f README.md
21+ echo $EXCHANGE_NAME > name
2022(git commit -m " [BUILD]: $GITHUB_SHA " && git push origin main --force) || echo " No changes to commit"
Original file line number Diff line number Diff line change 1919 # with:
2020 # node-version: '22'
2121 # cache: 'npm'
22+ # - name: Cache npm dependencies
23+ # uses: actions/cache@v3
24+ # with:
25+ # path: ~/.npm
26+ # key: ${{ runner.os }}-npm-${{ hashFiles('**/package.json') }}
27+ # restore-keys: |
28+ # ${{ runner.os }}-npm-
2229 # - name: Install dependencies
2330 # run: |
2431 # cd build
3037 # get repository name and it's first word before hypher and pass that as argument
3138 REPO_NAME=$(echo ${{ github.repository }} | cut -d'/' -f2 | cut -d'-' -f1)
3239 echo "REPO_NAME: $REPO_NAME"
33- # npm run build -- $REPO_NAME
40+ npm run build -- $REPO_NAME
41+
42+ - name : Commit and push changes
43+ run : |
44+ git config --local user.email "[email protected] " 45+ git config --local user.name "GitHub Action"
46+ git add README.md
47+ git commit -m "Update README with exchange repository links" || echo "No changes to commit"
48+ git push
Original file line number Diff line number Diff line change @@ -254,13 +254,13 @@ class build {
254254const argvs = process . argv . slice ( 2 ) ;
255255let exchange = argvs [ 0 ] ;
256256if ( ! exchange || exchange . includes ( '--' ) ) {
257- const nameFile = __dirname + '/../name ' ;
257+ const nameFile = __dirname + '/../exchange_name ' ;
258258 if ( fs . existsSync ( nameFile ) ) {
259259 exchange = fs . readFileSync ( nameFile , 'utf8' ) . trim ( ) ;
260260 }
261261}
262262if ( ! exchange ) {
263- console . error ( 'Please input exchange name in a "name " file in the root of the project' ) ;
263+ console . error ( 'Please pass exchange name to build script or set it in a "exchange_name " file in the root of the project' ) ;
264264 process . exit ( 1 ) ;
265265}
266266const donwloadAndDelete = ! argvs . includes ( '--nodownload' ) ;
You can’t perform that action at this time.
0 commit comments