From cd9a3b089014de4c143fc5f60af8bab2234bdc73 Mon Sep 17 00:00:00 2001 From: Wildan M Date: Mon, 16 Sep 2024 13:12:00 +0700 Subject: [PATCH] Add disable auto pin --- .github/workflows/domcloud.yml | 8 ++++++++ src/executor/runnercode.js | 1 + 2 files changed, 9 insertions(+) diff --git a/.github/workflows/domcloud.yml b/.github/workflows/domcloud.yml index c653ac9..1a44f0d 100644 --- a/.github/workflows/domcloud.yml +++ b/.github/workflows/domcloud.yml @@ -64,3 +64,11 @@ jobs: webhook_auth: ${{ secrets.WEBHOOK_AUTH_SGP }} data: >- {"commands":["git pull","npm i","npm test","sudo systemctl restart bridge"]} + - name: Invoke MNZ deployment hook + uses: distributhor/workflow-webhook@v3 + env: + webhook_url: https://my.domcloud.co/api/githubdeploy + webhook_secret: ${{ secrets.WEBHOOK_SECRET_MNZ }} + webhook_auth: ${{ secrets.WEBHOOK_AUTH_MNZ }} + data: >- + {"commands":["git pull","npm i","npm test","sudo systemctl restart bridge"]} diff --git a/src/executor/runnercode.js b/src/executor/runnercode.js index 2b73266..9a43e98 100644 --- a/src/executor/runnercode.js +++ b/src/executor/runnercode.js @@ -76,6 +76,7 @@ export async function runConfigCodeFeatures(key, value, writeLog, domaindata, ss await sshExec("pathman add .local/opt/node/bin ; source ~/.config/envman/PATH.env"); await sshExec(`curl -sS https://webinstall.dev/node${arg} | bash`); await sshExec("command -v corepack &> /dev/null || npm i -g corepack && corepack enable"); + await sshExec(`[[ -z $COREPACK_ENABLE_AUTO_PIN ]] && echo "COREPACK_ENABLE_AUTO_PIN=0" >> ~/.bashrc && source ~/.bashrc`) await sshExec("node --version"); } break;