no_push can be used without login (#111)

- fixes #110
This commit is contained in:
Casper da Costa-Luis
2020-12-15 07:44:30 +00:00
committed by GitHub
parent 5e568ddac4
commit f7aca2fea7
2 changed files with 25 additions and 7 deletions

View File

@@ -627,6 +627,18 @@ teardown() {
/usr/local/bin/docker logout"
}
@test "it can be used for building without login" {
export GITHUB_REF='refs/heads/master'
export INPUT_NO_PUSH='true'
export INPUT_USERNAME=''
run /entrypoint.sh
expectStdOutIs ""
expectMockCalledIs "/usr/local/bin/docker build -t my/repository:latest ."
}
@test "it can change the default branch" {
export GITHUB_REF='refs/heads/trunk'
export INPUT_DEFAULT_BRANCH='trunk'