mirror of
https://github.com/elgohr/Publish-Docker-Github-Action.git
synced 2026-03-12 18:07:12 -04:00
Be verbose on ACTIONS_STEP_DEBUG
This commit is contained in:
@@ -4,6 +4,10 @@ set -e
|
|||||||
function main() {
|
function main() {
|
||||||
echo "" # see https://github.com/actions/toolkit/issues/168
|
echo "" # see https://github.com/actions/toolkit/issues/168
|
||||||
|
|
||||||
|
if usesBoolean "${ACTIONS_STEP_DEBUG}"; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
|
||||||
sanitize "${INPUT_NAME}" "name"
|
sanitize "${INPUT_NAME}" "name"
|
||||||
sanitize "${INPUT_USERNAME}" "username"
|
sanitize "${INPUT_USERNAME}" "username"
|
||||||
sanitize "${INPUT_PASSWORD}" "password"
|
sanitize "${INPUT_PASSWORD}" "password"
|
||||||
|
|||||||
@@ -563,6 +563,15 @@ teardown() {
|
|||||||
/usr/local/bin/docker push my/repository:B"
|
/usr/local/bin/docker push my/repository:B"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "it is verbose on ACTIONS_STEP_DEBUG" {
|
||||||
|
export GITHUB_REF='refs/heads/master'
|
||||||
|
export ACTIONS_STEP_DEBUG=true
|
||||||
|
|
||||||
|
run /entrypoint.sh
|
||||||
|
|
||||||
|
expectStdOutContains "sanitize my/repository name" # prints the commands
|
||||||
|
}
|
||||||
|
|
||||||
function expectStdOutContains() {
|
function expectStdOutContains() {
|
||||||
local expected=$(echo "${1}" | tr -d '\n')
|
local expected=$(echo "${1}" | tr -d '\n')
|
||||||
local got=$(echo "${output}" | tr -d '\n')
|
local got=$(echo "${output}" | tr -d '\n')
|
||||||
|
|||||||
Reference in New Issue
Block a user