From d1c1493ee8cede92b79dabb165f567ca5b179d55 Mon Sep 17 00:00:00 2001 From: sindrerh2 Date: Tue, 29 Mar 2022 14:15:22 +0200 Subject: [PATCH] fix: change JAVA_HOME env in Dockerfile/entrypoint Co-authored-by: name tommy.troen@nav.no --- action.yml | 19 +++++++++++++++++++ entrypoint.sh | 1 + 2 files changed, 20 insertions(+) diff --git a/action.yml b/action.yml index 41e9c21..c57b1d9 100644 --- a/action.yml +++ b/action.yml @@ -31,6 +31,22 @@ inputs: The key used to sign the attestation required: true + docker_user: + description: |- + User to login to docker + required: true + + docker_pwd: + description: |- + Pwd to login to docker + required: true + + docker_registry: + description: |- + docker registry + required: true + default: "ghcr.io" + image: description: |- docker image to sign. Defaults to $ENV_IMAGE. @@ -62,3 +78,6 @@ runs: - ${{ inputs.env_context }} - ${{ inputs.repo_sub_dir }} - ${{ inputs.key }} + - ${{ inputs.docker_user }} + - ${{ inputs.docker_pwd }} + - ${{ inputs.docker_registry }} diff --git a/entrypoint.sh b/entrypoint.sh index 746f807..d4e8360 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -10,6 +10,7 @@ export JAVA_HOME=/opt/java/openjdk echo "JAVA_HOME: $JAVA_HOME" echo "MAVEN_HOME: $MAVEN_HOME" echo "---------- Preparing pico-de-galo Slsa for repository: $REPO_NAME ----------" +echo $INPUT_DOCKER_PWD | docker login $INPUT_DOCKER_REGISTRY -u $INPUT_DOCKER_USER --password-stdin salsa scan \ --repo "$REPO_NAME" \