We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want to access the name of the runner executing an action. From runner-context I want to access:
runner.name
runner.os
runner.arch
For runner.os and runner.arch I can implement alternatives, but I couldn't find a way to get runner.name.
My motivation is to give artifacts unique names that are recognizable by adding the runner name to them.
So for a JavaScript / TypeScript action my-action running from workflow
my-action
jobs: test: strategy: matrix: os: [ubuntu-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - uses: username/my-action
I want to get "ubuntu-latest" and "windows-latest".
"ubuntu-latest"
"windows-latest"
const core = require('@actions/core'); console.log(core.runner.name) // "ubuntu-latest" console.log(core.runner.os) // "Ubuntu 22.04.3 LTS" or similar console.log(core.runner.arch) // "x64"
Similar to #599, but I only need runner context information. Similar to capabilities documented in https://github.com/actions/toolkit/tree/main/packages/core#platform-helper, but that one isn't defined: #1630.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
I want to access the name of the runner executing an action.
From runner-context I want to access:
runner.name
runner.os
runner.arch
For
runner.os
andrunner.arch
I can implement alternatives, but I couldn't find a way to getrunner.name
.My motivation is to give artifacts unique names that are recognizable by adding the runner name to them.
Code Snipped
So for a JavaScript / TypeScript action
my-action
running from workflowI want to get
"ubuntu-latest"
and"windows-latest"
.Additional information
Similar to #599, but I only need runner context information.
Similar to capabilities documented in https://github.com/actions/toolkit/tree/main/packages/core#platform-helper, but that one isn't defined: #1630.
Versions 'n' stuff
The text was updated successfully, but these errors were encountered: