Skip to content

Commit

Permalink
Fix command
Browse files Browse the repository at this point in the history
  • Loading branch information
kobi-lemberg committed Mar 19, 2020
1 parent 0e59744 commit 37ae3e9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ inputs:
docker-registry: # Docker registry
description: 'docker registry'
required: false
packages-resolver: # packages resolver
description: 'packages resolver'
required: false
runs:
using: 'docker'
image: 'Dockerfile'
Expand All @@ -23,6 +26,7 @@ runs:
- ${{ inputs.docker-login-password }}
- ${{ inputs.docker-registry }}
- ${{ inputs.command }}
- ${{ inputs.packages-resolver }}

branding:
icon: 'package'
Expand Down
5 changes: 4 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,23 @@

set -x
COMMAND=""

IVY_CONF=""
if [[ -z ${1} || -z ${2} || -z ${3} ]]; then
echo "One or more variables are not defined, will run command"
COMMAND = $1
IVY_CONF = $2
else
DOCKER_USERNAME=$1
DOCKER_PASSWORD=$2
DOCKER_REGISTRY=$3
COMMAND=$4
IVY_CONF=$5
echo "Running docker login into ${DOCKER_REGISTRY}"

echo ${DOCKER_PASSWORD} | docker login -u ${DOCKER_USERNAME} --password-stdin ${DOCKER_REGISTRY}
fi

echo "Running command"
echo ${IVY_CONF} >> ~/.ivy2/credentials
${COMMAND}

0 comments on commit 37ae3e9

Please sign in to comment.