Skip to content

Commit

Permalink
Merge pull request #10 from hixus/fix-inputs
Browse files Browse the repository at this point in the history
Fix inputs
  • Loading branch information
jwalton authored Oct 5, 2021
2 parents 7cf5c4f + 68224fa commit abf9168
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
22 changes: 20 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,26 @@ description: Collect logs from all docker containers.
inputs:
dest:
description: |
If provided, a folder to put logs in. If not provided, logs will be
sent to the screen.
Destination folder to write to. If not provided, logs will be written to
stdout. If provided, the folder will be created if it doesn't exist, and
files will be written based on container names (e.g. 'redis.log').
required: false
images:
description: |
A comma delimited list of image names. If provided, only output from
containers with these images will be shown. Containers will match if the
image matches exactly (e.g. "mongo:3.4.22") or if the image name matches
without a tag (e.g. "mongo" will match "mongo:3.4.22").
required: false
tail:
description: Max number of lines to show from each container. Defaults to "all".
required: false
default: all
shell:
description: Shell to execute commands. Defaults to "/bin/sh".
required: false
default: /bin/sh

runs:
using: node12
main: 'main.js'
Expand Down
4 changes: 2 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ const core = require('@actions/core');

const dest = core.getInput('dest') || undefined;
const images = core.getInput('images') || undefined;
const tail = core.getInput('tail') || 'all';
const shell = core.getInput('shell') || '/bin/sh';
const tail = core.getInput('tail');
const shell = core.getInput('shell');

const imagesFilter = typeof images === 'string' ? images.split(',') : undefined;

Expand Down

0 comments on commit abf9168

Please sign in to comment.