diff --git a/action.yml b/action.yml index 104d12b1..809bfbc2 100644 --- a/action.yml +++ b/action.yml @@ -117,19 +117,11 @@ runs: shell: bash run: mv gitstream code - - name: Clear npm cache - shell: bash - run: npm cache clean --force - - - name: Install Dependencies for plugins - shell: bash - continue-on-error: true - run: npm i --ignore-scripts moment@2.30.1 lodash@4.18.1 axios@1.14.0 @octokit/rest@20.1.1 - - name: Run RulesEngine shell: bash run: node ${{ github.action_path }}/dist/index.js env: + NODE_PATH: ${{ github.action_path }}/dist/node_modules HEAD_REF: ${{ steps.safe-strings.outputs.head_ref }} BASE_REF: ${{ steps.safe-strings.outputs.base_ref }} CLIENT_PAYLOAD: ${{ steps.safe-strings.outputs.client_payload }} diff --git a/package.json b/package.json index 347837a3..c22bc41a 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,8 @@ "format:check": "prettier --check .", "lint": "eslint .", "copy-wasm": "mkdir -p dist/node_modules/@wasm-fmt && cp -r node_modules/@wasm-fmt/ruff_fmt dist/node_modules/@wasm-fmt/", - "package": "ncc build --minify src/index.ts -o dist --license licenses.txt --external @wasm-fmt/ruff_fmt --external isolated-vm && npm run copy-wasm", + "vendor-plugins": "npm install --prefix dist --ignore-scripts --no-save moment@2.30.1 lodash@4.18.1 axios@1.14.0 @octokit/rest@20.1.1", + "package": "ncc build --minify src/index.ts -o dist --license licenses.txt --external @wasm-fmt/ruff_fmt --external isolated-vm && npm run copy-wasm && npm run vendor-plugins", "test": "jest", "all": "npm run format:write && npm run lint && npm run test && npm run package", "create-tag": "./scripts/tag-version.sh",