Skip to content

Commit

Permalink
v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
selfagency committed Sep 19, 2022
1 parent 098f407 commit 303390d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 8 deletions.
25 changes: 20 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,21 @@ Capture the output (and duration) of a command as a GitHub Actions `output` or f

## How to use this Action

Required inputs:

- `cmd`: The Bash command you want to run

Optional inputs:

- `args`: A comma-separated list of arguments to run the command with
- `hide-warnings`: Whether to report warnings in the GitHub Actions logs
- `file`: The file to in which to record the output

Outputs:

- `output`: The command output (stdout + stderr)
- `duration`: The time the command took to run, in seconds

```
name: Capture output
on:
Expand All @@ -13,10 +28,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Capture output
uses: 'selfagency/[email protected].0'
uses: 'selfagency/[email protected].1'
with:
cmd: yarn
args: run,build,--verbose
hide-warnings: true
file: '${{ github.workspace }}/output.txt'
command: 'yarn'
args: 'run,build,--verbose'
```
file: ${{ github.workspace }}/output.txt
```
2 changes: 1 addition & 1 deletion dist/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3235,7 +3235,7 @@ var errorOut = (data, hideWarning) => {
(async () => {
var _a;
try {
const op = import_core.default.getInput("op");
const op = import_core.default.getInput("cmd");
const args = (_a = import_core.default.getInput("args")) == null ? void 0 : _a.split(" ");
const hideWarning = import_core.default.getInput("hide-warning") === "true";
const file = import_core.default.getInput("file");
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "capture-output",
"version": "1.0.0",
"version": "1.0.1",
"description": "Capture the output (and duration) of a command as a GitHub Actions `output` or file",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const errorOut = (data: string, hideWarning?: boolean) => {

(async () => {
try {
const op: string = core.getInput('op');
const op: string = core.getInput('cmd');
const args: string[] = core.getInput('args')?.split(' ');
const hideWarning: boolean = core.getInput('hide-warning') === 'true';
const file: string = core.getInput('file');
Expand Down

0 comments on commit 303390d

Please sign in to comment.