From 8ecd48b42f1e47456ae39ed0006020d812ac976b Mon Sep 17 00:00:00 2001 From: GavinMeierSonos Date: Thu, 7 Mar 2024 09:41:25 -0600 Subject: [PATCH] Allow for a base image to be defined to avoid rate limiting --- Dockerfile | 3 ++- action.yml | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 882c681..23d169c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ -FROM sonarsource/sonar-scanner-cli:5.0.1 +ARG INPUT_BASEIMAGE=sonarsource/sonar-scanner-cli:5.0.1 +FROM INPUT_BASEIMAGE LABEL version="2.0.1" \ repository="https://github.com/sonarsource/sonarqube-scan-action" \ diff --git a/action.yml b/action.yml index b2baff6..a818025 100644 --- a/action.yml +++ b/action.yml @@ -9,6 +9,8 @@ runs: image: Dockerfile entrypoint: "/entrypoint.sh" post-entrypoint: "/cleanup.sh" + args: + - ${{ inputs.baseImage }} inputs: args: description: Additional arguments to the sonar-scanner @@ -17,3 +19,6 @@ inputs: description: Set the sonar.projectBaseDir analysis property required: false default: . + baseImage: + description: Allow for a different base image to be used from a private registry to avoid rate limiting. + required: false