From b1a32b8e0f62375d40690ac9816512a6dd8afbcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Marquis?= Date: Wed, 3 Jun 2026 17:56:53 +0200 Subject: [PATCH 1/9] chore: migrate to Node.js 24 and update vega/canvas dependencies Bumps the GitHub Actions runtime from node16 to node24 to meet the upcoming deprecation deadline (June 2026). Fixes the canvas installation failure on Node 22+ runners by upgrading the globally-installed Vega stack: - canvas 2 -> 3 - vega 5 -> 6 - vega-cli 5 -> 6 - vega-lite 5 -> 6 canvas@2 does not provide prebuilt binaries for the node-v127 ABI (Node 22/24), causing a 404 during install. canvas@3 and vega-cli@6 include prebuilt binaries for modern Node versions. Also updates: - engines.node to >=24.x - @types/node to ^24.0.0 - actions/checkout to v6 in workflows --- .github/workflows/check.yml | 8 +- README.md | 4 +- action.yml | 2 +- dist/index.js | 2 +- package-lock.json | 426 +++--------------------------------- package.json | 4 +- src/setup-cml.ts | 2 +- 7 files changed, 38 insertions(+), 410 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index de90746..a6ce9f5 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -13,7 +13,7 @@ jobs: verify: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - run: | npm ci npm run format @@ -33,7 +33,7 @@ jobs: - windows-latest runs-on: ${{ matrix.system }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - name: run action with latest uses: ./ - name: test @@ -58,7 +58,7 @@ jobs: - windows-latest runs-on: ${{ matrix.system }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - name: run action with latest uses: ./ with: @@ -82,7 +82,7 @@ jobs: - windows-latest runs-on: ${{ matrix.system }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - name: run action with latest uses: ./ with: diff --git a/README.md b/README.md index 4f5229d..c7073d6 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Note that CML does not include DVC and its dependencies (see the ## Note on v2 `v1` of setup-cml was a wrapper around a set of npm installs. `v2` installs CML from its -pre-packaged binaries. Then attempts to run `npm install --global canvas@2 vega@5 vega-cli@5 vega-lite@5` +pre-packaged binaries. Then attempts to run `npm install --global canvas@3 vega@6 vega-cli@6 vega-lite@6` if you do not wish to install these tools pass `vega: false` to the action. link to [`v1`](https://github.com/iterative/setup-cml/tree/v1) @@ -74,7 +74,7 @@ The following inputs are supported. to `latest` for the [most recent CML release](https://github.com/iterative/cml/releases). - `vega` - (optional) Whether to install vega dependencies. Defaults to `true`. - runs command `npm install --global canvas@2 vega@5 vega-cli@5 vega-lite@5` + runs command `npm install --global canvas@3 vega@6 vega-cli@6 vega-lite@6` ## A complete example diff --git a/action.yml b/action.yml index 37e3990..e4dd5d9 100644 --- a/action.yml +++ b/action.yml @@ -11,7 +11,7 @@ inputs: default: 'true' required: false runs: - using: node16 + using: node24 main: dist/index.js branding: icon: terminal diff --git a/dist/index.js b/dist/index.js index 49b5b63..9f66e11 100644 --- a/dist/index.js +++ b/dist/index.js @@ -14906,7 +14906,7 @@ function run() { } if (vega) { try { - (0, exec_1.exec)('npm install --global canvas@2 vega@5 vega-cli@5 vega-lite@5'); + (0, exec_1.exec)('npm install --global canvas@3 vega@6 vega-cli@6 vega-lite@6'); } catch (error) { core.warning('Failed to intall vega tools'); diff --git a/package-lock.json b/package-lock.json index 2dda6d1..72b011b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ }, "devDependencies": { "@types/jest": "^27.0.2", - "@types/node": "^16.11.25", + "@types/node": "^24.0.0", "@types/semver": "^6.0.0", "@typescript-eslint/eslint-plugin": "^5.54.0", "@typescript-eslint/parser": "^5.54.0", @@ -32,7 +32,7 @@ "typescript": "^4.2.3" }, "engines": { - "node": ">=16.x" + "node": ">=24.x" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -44,23 +44,6 @@ "node": ">=0.10.0" } }, - "node_modules/@actions/cache": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-3.2.2.tgz", - "integrity": "sha512-6D0Jq5JrLZRQ3VApeQwQkkV20ZZXjXsHNYXd9VjNUdi9E0h93wESpxfMJ2JWLCUCgHNLcfY0v3GjNM+2FdRMlg==", - "dependencies": { - "@actions/core": "^1.10.0", - "@actions/exec": "^1.0.1", - "@actions/glob": "^0.1.0", - "@actions/http-client": "^2.1.1", - "@actions/io": "^1.0.1", - "@azure/abort-controller": "^1.1.0", - "@azure/ms-rest-js": "^2.6.0", - "@azure/storage-blob": "^12.13.0", - "semver": "^6.1.0", - "uuid": "^3.3.3" - } - }, "node_modules/@actions/core": { "version": "1.10.1", "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.1.tgz", @@ -86,15 +69,6 @@ "@actions/io": "^1.0.1" } }, - "node_modules/@actions/glob": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@actions/glob/-/glob-0.1.2.tgz", - "integrity": "sha512-SclLR7Ia5sEqjkJTPs7Sd86maMDw43p769YxBOxvPvEWuPEhpAnBsQfENOpXjFYMmhCqd127bmf+YdvJqVqR4A==", - "dependencies": { - "@actions/core": "^1.2.6", - "minimatch": "^3.0.4" - } - }, "node_modules/@actions/http-client": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.1.1.tgz", @@ -134,257 +108,6 @@ "node": ">=6.0.0" } }, - "node_modules/@azure/abort-controller": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.1.0.tgz", - "integrity": "sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw==", - "dependencies": { - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@azure/core-auth": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.5.0.tgz", - "integrity": "sha512-udzoBuYG1VBoHVohDTrvKjyzel34zt77Bhp7dQntVGGD0ehVq48owENbBG8fIgkHRNUBQH5k1r0hpoMu5L8+kw==", - "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-util": "^1.1.0", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@azure/core-http": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-3.0.3.tgz", - "integrity": "sha512-QMib3wXotJMFhHgmJBPUF9YsyErw34H0XDFQd9CauH7TPB+RGcyl9Ayy7iURtJB04ngXhE6YwrQsWDXlSLrilg==", - "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-tracing": "1.0.0-preview.13", - "@azure/core-util": "^1.1.1", - "@azure/logger": "^1.0.0", - "@types/node-fetch": "^2.5.0", - "@types/tunnel": "^0.0.3", - "form-data": "^4.0.0", - "node-fetch": "^2.6.7", - "process": "^0.11.10", - "tslib": "^2.2.0", - "tunnel": "^0.0.6", - "uuid": "^8.3.0", - "xml2js": "^0.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@azure/core-http/node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/@azure/core-http/node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/@azure/core-http/node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, - "node_modules/@azure/core-http/node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/@azure/core-http/node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "node_modules/@azure/core-http/node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/@azure/core-lro": { - "version": "2.5.4", - "resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-2.5.4.tgz", - "integrity": "sha512-3GJiMVH7/10bulzOKGrrLeG/uCBH/9VtxqaMcB9lIqAeamI/xYQSHJL/KcsLDuH+yTjYpro/u6D/MuRe4dN70Q==", - "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-util": "^1.2.0", - "@azure/logger": "^1.0.0", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@azure/core-paging": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@azure/core-paging/-/core-paging-1.5.0.tgz", - "integrity": "sha512-zqWdVIt+2Z+3wqxEOGzR5hXFZ8MGKK52x4vFLw8n58pR6ZfKRx3EXYTxTaYxYHc/PexPUTyimcTWFJbji9Z6Iw==", - "dependencies": { - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@azure/core-tracing": { - "version": "1.0.0-preview.13", - "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz", - "integrity": "sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==", - "dependencies": { - "@opentelemetry/api": "^1.0.1", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@azure/core-util": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.5.0.tgz", - "integrity": "sha512-GZBpVFDtQ/15hW1OgBcRdT4Bl7AEpcEZqLfbAvOtm1CQUncKWiYapFHVD588hmlV27NbOOtSm3cnLF3lvoHi4g==", - "dependencies": { - "@azure/abort-controller": "^1.0.0", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@azure/logger": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.0.4.tgz", - "integrity": "sha512-ustrPY8MryhloQj7OWGe+HrYx+aoiOxzbXTtgblbV3xwCqpzUK36phH3XNHQKj3EPonyFUuDTfR3qFhTEAuZEg==", - "dependencies": { - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@azure/ms-rest-js": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/@azure/ms-rest-js/-/ms-rest-js-2.7.0.tgz", - "integrity": "sha512-ngbzWbqF+NmztDOpLBVDxYM+XLcUj7nKhxGbSU9WtIsXfRB//cf2ZbAG5HkOrhU9/wd/ORRB6lM/d69RKVjiyA==", - "dependencies": { - "@azure/core-auth": "^1.1.4", - "abort-controller": "^3.0.0", - "form-data": "^2.5.0", - "node-fetch": "^2.6.7", - "tslib": "^1.10.0", - "tunnel": "0.0.6", - "uuid": "^8.3.2", - "xml2js": "^0.5.0" - } - }, - "node_modules/@azure/ms-rest-js/node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/@azure/ms-rest-js/node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, - "node_modules/@azure/ms-rest-js/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - }, - "node_modules/@azure/ms-rest-js/node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/@azure/ms-rest-js/node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "node_modules/@azure/ms-rest-js/node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/@azure/storage-blob": { - "version": "12.16.0", - "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.16.0.tgz", - "integrity": "sha512-jz33rUSUGUB65FgYrTRgRDjG6hdPHwfvHe+g/UrwVG8MsyLqSxg9TaW7Yuhjxu1v1OZ5xam2NU6+IpCN0xJO8Q==", - "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-http": "^3.0.0", - "@azure/core-lro": "^2.2.0", - "@azure/core-paging": "^1.1.1", - "@azure/core-tracing": "1.0.0-preview.13", - "@azure/logger": "^1.0.0", - "events": "^3.0.0", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/@babel/code-frame": { "version": "7.22.13", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", @@ -1687,14 +1410,6 @@ "@octokit/openapi-types": "^19.0.0" } }, - "node_modules/@opentelemetry/api": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.6.0.tgz", - "integrity": "sha512-OWlrQAnWn9577PhVgqjUvMr1pg57Bc4jv0iL4w0PRuOSRvq67rvHW9Ie/dZVMvCzhSCB+UxhcY/PmCmFj33Q+g==", - "engines": { - "node": ">=8.0.0" - } - }, "node_modules/@sinonjs/commons": { "version": "1.8.6", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", @@ -1813,30 +1528,13 @@ "dev": true }, "node_modules/@types/node": { - "version": "16.18.54", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.54.tgz", - "integrity": "sha512-oTmGy68gxZZ21FhTJVVvZBYpQHEBZxHKTsGshobMqm9qWpbqdZsA5jvsuPZcHu0KwpmLrOHWPdEfg7XDpNT9UA==" - }, - "node_modules/@types/node-fetch": { - "version": "2.6.6", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.6.tgz", - "integrity": "sha512-95X8guJYhfqiuVVhRFxVQcf4hW/2bCuoPwDasMf/531STFoNoWTT7YDnWdXHEZKqAGUigmpG31r2FE70LwnzJw==", - "dependencies": { - "@types/node": "*", - "form-data": "^4.0.0" - } - }, - "node_modules/@types/node-fetch/node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "version": "24.12.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.12.4.tgz", + "integrity": "sha512-GUUEShf+PBCGW2KaXwcIt3Yk+e3pkKwWKb9GSyM9WQVE+ep2jzmHdGsHzu4wgcZy5fN9FBdVzjpBQsYlpfpgLA==", + "dev": true, + "license": "MIT", "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" + "undici-types": "~7.16.0" } }, "node_modules/@types/prettier": { @@ -1857,14 +1555,6 @@ "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", "dev": true }, - "node_modules/@types/tunnel": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@types/tunnel/-/tunnel-0.0.3.tgz", - "integrity": "sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/yargs": { "version": "16.0.6", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.6.tgz", @@ -2188,17 +1878,6 @@ "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", "dev": true }, - "node_modules/abort-controller": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", - "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", - "dependencies": { - "event-target-shim": "^5.0.0" - }, - "engines": { - "node": ">=6.5" - } - }, "node_modules/acorn": { "version": "8.10.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", @@ -2361,7 +2040,8 @@ "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true }, "node_modules/babel-jest": { "version": "27.5.1", @@ -2458,7 +2138,8 @@ "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true }, "node_modules/before-after-hook": { "version": "2.2.3", @@ -2469,6 +2150,7 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2684,6 +2366,7 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, "dependencies": { "delayed-stream": "~1.0.0" }, @@ -2694,7 +2377,8 @@ "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true }, "node_modules/convert-source-map": { "version": "1.9.0", @@ -2810,6 +2494,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true, "engines": { "node": ">=0.4.0" } @@ -3260,22 +2945,6 @@ "node": ">=0.10.0" } }, - "node_modules/event-target-shim": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", - "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", - "engines": { - "node": ">=6" - } - }, - "node_modules/events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "engines": { - "node": ">=0.8.x" - } - }, "node_modules/execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", @@ -3469,19 +3138,6 @@ "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", "dev": true }, - "node_modules/form-data": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", - "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 0.12" - } - }, "node_modules/formdata-polyfill": { "version": "4.0.10", "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", @@ -4939,6 +4595,7 @@ "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, "engines": { "node": ">= 0.6" } @@ -4947,6 +4604,7 @@ "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, "dependencies": { "mime-db": "1.52.0" }, @@ -4967,6 +4625,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -5364,14 +5023,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", - "engines": { - "node": ">= 0.6.0" - } - }, "node_modules/prompts": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", @@ -5569,11 +5220,6 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, - "node_modules/sax": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", - "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==" - }, "node_modules/saxes": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", @@ -5966,11 +5612,6 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, - "node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, "node_modules/tsutils": { "version": "3.21.0", "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", @@ -6043,6 +5684,13 @@ "node": ">=4.2.0" } }, + "node_modules/undici-types": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", + "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", + "dev": true, + "license": "MIT" + }, "node_modules/universalify": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", @@ -6286,26 +5934,6 @@ "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", "dev": true }, - "node_modules/xml2js": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", - "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", - "dependencies": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/xmlbuilder": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", - "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", - "engines": { - "node": ">=4.0" - } - }, "node_modules/xmlchars": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", diff --git a/package.json b/package.json index 15befd2..cea59aa 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ } ], "engines": { - "node": ">=16.x" + "node": ">=24.x" }, "main": "src/setup-cml.ts", "scripts": { @@ -46,7 +46,7 @@ }, "devDependencies": { "@types/jest": "^27.0.2", - "@types/node": "^16.11.25", + "@types/node": "^24.0.0", "@types/semver": "^6.0.0", "@typescript-eslint/eslint-plugin": "^5.54.0", "@typescript-eslint/parser": "^5.54.0", diff --git a/src/setup-cml.ts b/src/setup-cml.ts index 426a209..343f277 100644 --- a/src/setup-cml.ts +++ b/src/setup-cml.ts @@ -34,7 +34,7 @@ async function run() { } if (vega) { try { - exec('npm install --global canvas@2 vega@5 vega-cli@5 vega-lite@5'); + exec('npm install --global canvas@3 vega@6 vega-cli@6 vega-lite@6'); } catch (error: any) { core.warning('Failed to intall vega tools'); } From 959663fc0e5258fc9090894d1256920beab89d47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Marquis?= Date: Thu, 4 Jun 2026 08:54:06 +0200 Subject: [PATCH 2/9] fix: typo in vega tools install warning --- src/setup-cml.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/setup-cml.ts b/src/setup-cml.ts index 343f277..de7a2d7 100644 --- a/src/setup-cml.ts +++ b/src/setup-cml.ts @@ -36,7 +36,7 @@ async function run() { try { exec('npm install --global canvas@3 vega@6 vega-cli@6 vega-lite@6'); } catch (error: any) { - core.warning('Failed to intall vega tools'); + core.warning('Failed to install vega tools'); } } } catch (error: any) { From 2e1bb58af7c4deef9b9091b025e39d1e94aa40f8 Mon Sep 17 00:00:00 2001 From: Helio Machado <0x2b3bfa0+git@googlemail.com> Date: Wed, 17 Jun 2026 18:20:34 +0200 Subject: [PATCH 3/9] Update check.yml --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index a6ce9f5..28fff4b 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -1,4 +1,4 @@ -name: Check CML GitHub Action +name: Check CML GitHub Action on: schedule: - cron: 0 0 * * * From 15eb7c559b2371d4b1b5aa6c04017c43ba6e9fce Mon Sep 17 00:00:00 2001 From: Helio Machado <0x2b3bfa0+git@googlemail.com> Date: Wed, 17 Jun 2026 18:20:56 +0200 Subject: [PATCH 4/9] Update check.yml --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 28fff4b..a6ce9f5 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -1,4 +1,4 @@ -name: Check CML GitHub Action +name: Check CML GitHub Action on: schedule: - cron: 0 0 * * * From 1c7b411768df734f5888739d43b8e0a8ef53abb4 Mon Sep 17 00:00:00 2001 From: Helio Machado <0x2b3bfa0+git@googlemail.com> Date: Wed, 17 Jun 2026 18:22:12 +0200 Subject: [PATCH 5/9] Update check.yml --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index a6ce9f5..f215a3f 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -2,7 +2,7 @@ name: Check CML GitHub Action on: schedule: - cron: 0 0 * * * - pull_request: + pull_request: {} permissions: contents: write From 693d1a4960c64854e023255363df7ab030c303a1 Mon Sep 17 00:00:00 2001 From: Ivan Shcheklein Date: Fri, 26 Jun 2026 13:03:15 -0700 Subject: [PATCH 6/9] build: rebuild dist to sync vega tools warning typo fix The typo fix in src/setup-cml.ts (intall -> install) was committed without rebuilding dist/index.js, so `npm run build && git diff --exit-code` in the verify job failed. Rebuild dist so it matches src. Co-Authored-By: Claude Opus 4.8 (1M context) --- dist/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/index.js b/dist/index.js index 9f66e11..df9200e 100644 --- a/dist/index.js +++ b/dist/index.js @@ -14909,7 +14909,7 @@ function run() { (0, exec_1.exec)('npm install --global canvas@3 vega@6 vega-cli@6 vega-lite@6'); } catch (error) { - core.warning('Failed to intall vega tools'); + core.warning('Failed to install vega tools'); } } } From 0a6218d0500cae245dcdc2b72f79cc96ce58bcdb Mon Sep 17 00:00:00 2001 From: Ivan Shcheklein Date: Fri, 26 Jun 2026 16:03:02 -0700 Subject: [PATCH 7/9] ci: make checks pass on fork PRs - Authenticate the action's CML release lookup by passing GITHUB_TOKEN to each `uses: ./` step. Unauthenticated calls hit the 60/hr per-IP limit and flake on shared macOS/Windows runners (test-version[-prefix] failures). - Guard `cml comment/check create` to run only where the token is write-scoped (same-repo PRs and the scheduled run). Fork PRs get a read-only GITHUB_TOKEN, so that step 403s; skipping it lets test-latest pass while still exercising install + `cml --version`. The scheduled run on the default branch keeps full end-to-end coverage. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/check.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index f215a3f..7f226c9 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -36,9 +36,15 @@ jobs: - uses: actions/checkout@v6 - name: run action with latest uses: ./ + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: test run: cml --version + # cml comment/check create need a write-scoped token, which PRs from forks + # don't get (read-only GITHUB_TOKEN). Run this step only where the token can + # write: same-repo PRs and the scheduled run on the default branch. - name: test CML + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository env: REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | @@ -63,6 +69,8 @@ jobs: uses: ./ with: version: v0.15.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: test CML specific version run: | if [ "$(cml --version 2>&1)" != '0.15.1' ]; then @@ -87,6 +95,8 @@ jobs: uses: ./ with: version: 0.15.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: test CML specific version run: | if [ "$(cml --version 2>&1)" != '0.15.1' ]; then From 4a88fbf665add05ba66bc99d1ef712be018f2ab4 Mon Sep 17 00:00:00 2001 From: Ivan Shcheklein Date: Fri, 26 Jun 2026 16:07:03 -0700 Subject: [PATCH 8/9] fix: authenticate GitHub API release lookup (auth, not token) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit new Octokit({ token }) is ignored by @octokit/rest — the option is `auth`. As a result the CML release lookup always ran unauthenticated (60 req/hr per IP), which flakes on shared macOS/Windows runners with "API rate limit exceeded". Switching to `auth: process.env.GITHUB_TOKEN` (now passed in via the workflow) raises the limit to 5000/hr and fixes the test-latest / test-version rate-limit failures. Verified: Octokit({token}) -> x-ratelimit-limit 60; Octokit({auth}) -> 5000. Co-Authored-By: Claude Opus 4.8 (1M context) --- dist/index.js | 2 +- src/setup-cml.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index df9200e..14c9253 100644 --- a/dist/index.js +++ b/dist/index.js @@ -14921,7 +14921,7 @@ function run() { function getCmlDownloadUrl(version, assetName) { return __awaiter(this, void 0, void 0, function* () { const octokit = new rest_1.Octokit({ - token: process.env.GITHUB_TOKEN, + auth: process.env.GITHUB_TOKEN, request: { fetch: node_fetch_1.default } diff --git a/src/setup-cml.ts b/src/setup-cml.ts index de7a2d7..d7f5470 100644 --- a/src/setup-cml.ts +++ b/src/setup-cml.ts @@ -54,7 +54,7 @@ async function getCmlDownloadUrl( assetName: string ): Promise { const octokit = new Octokit({ - token: process.env.GITHUB_TOKEN, + auth: process.env.GITHUB_TOKEN, request: { fetch: fetch } From 8fba89f6decfa1c56577de496f3ad75d11b7e35a Mon Sep 17 00:00:00 2001 From: Ivan Shcheklein Date: Fri, 26 Jun 2026 16:47:28 -0700 Subject: [PATCH 9/9] fix: robust vega install + authenticated release lookup + pin CI Node MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Address review feedback: - await the global vega install. exec() returns a Promise that rejects on failure; without await the try/catch never fires and the rejection becomes an unhandled rejection that crashes the action (the exact hard-fail seen in #103) instead of the intended core.warning. Now failures are non-fatal. - add a `token` action input (default ${{ github.token }}) and use it for the Octokit release lookup, so the lookup is authenticated (5000/hr) for all users by default — not just when GITHUB_TOKEN happens to be in the env. Removes the now-redundant GITHUB_TOKEN env from the CI action steps. - pin CI build to Node 24 via actions/setup-node, matching engines.node and the node24 action runtime (ncc output is Node-version-independent, verified). Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/check.yml | 9 +++------ README.md | 2 ++ action.yml | 4 ++++ dist/index.js | 4 ++-- src/setup-cml.ts | 6 ++++-- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 7f226c9..fda0a57 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -14,6 +14,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 + - uses: actions/setup-node@v4 + with: + node-version: 24 - run: | npm ci npm run format @@ -36,8 +39,6 @@ jobs: - uses: actions/checkout@v6 - name: run action with latest uses: ./ - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: test run: cml --version # cml comment/check create need a write-scoped token, which PRs from forks @@ -69,8 +70,6 @@ jobs: uses: ./ with: version: v0.15.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: test CML specific version run: | if [ "$(cml --version 2>&1)" != '0.15.1' ]; then @@ -95,8 +94,6 @@ jobs: uses: ./ with: version: 0.15.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: test CML specific version run: | if [ "$(cml --version 2>&1)" != '0.15.1' ]; then diff --git a/README.md b/README.md index c7073d6..efdd61f 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,8 @@ The following inputs are supported. [most recent CML release](https://github.com/iterative/cml/releases). - `vega` - (optional) Whether to install vega dependencies. Defaults to `true`. runs command `npm install --global canvas@3 vega@6 vega-cli@6 vega-lite@6` +- `token` - (optional) GitHub token used to look up the CML release to install. + Defaults to `${{ github.token }}`; authenticating avoids GitHub API rate limits. ## A complete example diff --git a/action.yml b/action.yml index e4dd5d9..aaace99 100644 --- a/action.yml +++ b/action.yml @@ -10,6 +10,10 @@ inputs: description: Whether to install Vega tools default: 'true' required: false + token: + description: GitHub token used to look up CML releases (avoids API rate limits). + default: ${{ github.token }} + required: false runs: using: node24 main: dist/index.js diff --git a/dist/index.js b/dist/index.js index 14c9253..ed8080a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -14906,7 +14906,7 @@ function run() { } if (vega) { try { - (0, exec_1.exec)('npm install --global canvas@3 vega@6 vega-cli@6 vega-lite@6'); + yield (0, exec_1.exec)('npm install --global canvas@3 vega@6 vega-cli@6 vega-lite@6'); } catch (error) { core.warning('Failed to install vega tools'); @@ -14921,7 +14921,7 @@ function run() { function getCmlDownloadUrl(version, assetName) { return __awaiter(this, void 0, void 0, function* () { const octokit = new rest_1.Octokit({ - auth: process.env.GITHUB_TOKEN, + auth: core.getInput('token') || process.env.GITHUB_TOKEN, request: { fetch: node_fetch_1.default } diff --git a/src/setup-cml.ts b/src/setup-cml.ts index d7f5470..12ddb6c 100644 --- a/src/setup-cml.ts +++ b/src/setup-cml.ts @@ -34,7 +34,9 @@ async function run() { } if (vega) { try { - exec('npm install --global canvas@3 vega@6 vega-cli@6 vega-lite@6'); + await exec( + 'npm install --global canvas@3 vega@6 vega-cli@6 vega-lite@6' + ); } catch (error: any) { core.warning('Failed to install vega tools'); } @@ -54,7 +56,7 @@ async function getCmlDownloadUrl( assetName: string ): Promise { const octokit = new Octokit({ - auth: process.env.GITHUB_TOKEN, + auth: core.getInput('token') || process.env.GITHUB_TOKEN, request: { fetch: fetch }