mirror of
https://github.com/s4u/maven-settings-action.git
synced 2026-02-17 00:00:20 +08:00
update node_modules
This commit is contained in:
39
node_modules/@actions/core/README.md
generated
vendored
39
node_modules/@actions/core/README.md
generated
vendored
@ -32,10 +32,12 @@ Since each step runs in a separate process, you can use `exportVariable` to add
|
||||
core.exportVariable('envVar', 'Val');
|
||||
```
|
||||
|
||||
Exporting a secret exports the variable but also registers the secret with the runner to ensure it is masked in logs.
|
||||
#### Setting a secret
|
||||
|
||||
Setting a secret registers the secret with the runner to ensure it is masked in logs.
|
||||
|
||||
```js
|
||||
core.exportSecret('myPassword', mypass);
|
||||
core.setSecret('myPassword');
|
||||
```
|
||||
|
||||
#### PATH Manipulation
|
||||
@ -102,4 +104,37 @@ const result = await core.group('Do something async', async () => {
|
||||
const response = await doSomeHTTPRequest()
|
||||
return response
|
||||
})
|
||||
```
|
||||
|
||||
#### Action state
|
||||
|
||||
You can use this library to save state and get state for sharing information between a given wrapper action:
|
||||
|
||||
**action.yml**
|
||||
```yaml
|
||||
name: 'Wrapper action sample'
|
||||
inputs:
|
||||
name:
|
||||
default: 'GitHub'
|
||||
runs:
|
||||
using: 'node12'
|
||||
main: 'main.js'
|
||||
post: 'cleanup.js'
|
||||
```
|
||||
|
||||
In action's `main.js`:
|
||||
|
||||
```js
|
||||
const core = require('@actions/core');
|
||||
|
||||
core.saveState("pidToKill", 12345);
|
||||
```
|
||||
|
||||
In action's `cleanup.js`:
|
||||
```js
|
||||
const core = require('@actions/core');
|
||||
|
||||
var pid = core.getState("pidToKill");
|
||||
|
||||
process.kill(pid);
|
||||
```
|
||||
Reference in New Issue
Block a user