Socket
Socket
Sign inDemoInstall

@actions/core

Package Overview
Dependencies
Maintainers
4
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@actions/core - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

0

lib/command.d.ts

@@ -0,0 +0,0 @@ interface CommandProperties {

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ /**

1

lib/core.js

@@ -52,3 +52,2 @@ "use strict";

command_1.issueCommand('set-secret', {}, val);
throw new Error('Not implemented.');
}

@@ -55,0 +54,0 @@ exports.exportSecret = exportSecret;

5

package.json
{
"name": "@actions/core",
"version": "1.1.1",
"version": "1.1.2",
"description": "Actions core lib",

@@ -25,3 +25,4 @@ "keywords": [

"type": "git",
"url": "git+https://github.com/actions/toolkit.git"
"url": "git+https://github.com/actions/toolkit.git",
"directory": "packages/core"
},

@@ -28,0 +29,0 @@ "scripts": {

@@ -7,13 +7,19 @@ # `@actions/core`

### Import the package
```js
// javascript
const core = require('@actions/core');
// typescript
import * as core from '@actions/core';
```
#### Inputs/Outputs
You can use this library to get inputs or set outputs:
Action inputs can be read with `getInput`. Outputs can be set with `setOutput` which makes them available to be mapped into inputs of other actions to ensure they are decoupled.
```js
const core = require('@actions/core');
const myInput = core.getInput('inputName', { required: true });
// Do stuff
core.setOutput('outputKey', 'outputVal');

@@ -24,10 +30,12 @@ ```

You can also export variables for future steps. Variables get set in the environment.
Since each step runs in a separate process, you can use `exportVariable` to add it to this step and future steps environment blocks.
```js
const core = require('@actions/core');
core.exportVariable('envVar', 'Val');
```
// Do stuff
Exporting a secret exports the variable but also registers the secret with the runner to ensure it is masked in logs.
core.exportVariable('envVar', 'Val');
```js
core.exportSecret('myPassword', mypass);
```

@@ -37,8 +45,6 @@

You can explicitly add items to the path for all remaining steps in a workflow:
To make a tool's path available in the path for the remainder of the job (without altering the machine or containers state), use `addPath`. The runner will prepend the path given to the jobs PATH.
```js
const core = require('@actions/core');
core.addPath('pathToTool');
core.addPath('/path/to/mytool');
```

@@ -48,3 +54,3 @@

You should use this library to set the failing exit code for your action:
You should use this library to set the failing exit code for your action. If status is not set and the script runs to completion, that will lead to a success.

@@ -62,2 +68,4 @@ ```js

Note that `setNeutral` is not yet implemented in actions V2 but equivalent functionality is being planned.
```

@@ -64,0 +72,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc