diff --git a/.github/workflows/github-script-deps.yaml b/.github/workflows/github-script-deps.yaml new file mode 100644 index 0000000..92c3180 --- /dev/null +++ b/.github/workflows/github-script-deps.yaml @@ -0,0 +1,39 @@ +name: Print github-script bundled dep versions + +on: + pull_request: + +permissions: + contents: read + +jobs: + versions: + runs-on: ubuntu-latest + steps: + - name: Print versions (from action runtime) + uses: actions/github-script@v8 + with: + script: | + function versionOf(pkg) { + try { + return __original_require__(`${pkg}/package.json`).version + } catch (err) { + return `NOT FOUND (${err.code || err.message})` + } + } + + const packages = [ + '@actions/core', + '@actions/exec', + '@actions/github', + '@actions/glob', + '@actions/io', + '@octokit/core', + ] + + const out = Object.fromEntries(packages.map(p => [p, versionOf(p)])) + + console.log(JSON.stringify({ + node: process.version, + ...out, + }, null, 2))