feat: redirect output to the variable (#14)
Redirect output to the variable
This commit is contained in:
commit
79f1b8008a
@ -8,6 +8,11 @@ inputs:
|
|||||||
args:
|
args:
|
||||||
description: 'Arguments for the CLI command'
|
description: 'Arguments for the CLI command'
|
||||||
required: false
|
required: false
|
||||||
|
redirect-to:
|
||||||
|
description: 'Variable name to redirect CLI output'
|
||||||
|
required: false
|
||||||
runs:
|
runs:
|
||||||
using: 'docker'
|
using: 'docker'
|
||||||
image: 'Dockerfile'
|
image: 'Dockerfile'
|
||||||
|
env:
|
||||||
|
dest: ${{ inputs.redirect-to }}
|
||||||
|
|||||||
@ -37,4 +37,12 @@ if [ ! -f "$HOME/.kube/config" ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "$dest" ]; then
|
||||||
kubectl $*
|
kubectl $*
|
||||||
|
else
|
||||||
|
echo "$dest<<EOF" >> $GITHUB_ENV
|
||||||
|
kubectl $* >> $GITHUB_ENV
|
||||||
|
echo "EOF" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
echo "::add-mask::$dest"
|
||||||
|
fi
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user