From 6f4c7654a3dac14d45f11de9697711e387744cf4 Mon Sep 17 00:00:00 2001 From: fabrizzio-dotCMS Date: Mon, 11 Sep 2023 15:41:14 -0600 Subject: [PATCH] fix replacing token --- actions/dot-cli/Dockerfile | 10 ---------- actions/dot-cli/entrypoint.sh | 11 +++++++++++ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/actions/dot-cli/Dockerfile b/actions/dot-cli/Dockerfile index f317453..1144e42 100755 --- a/actions/dot-cli/Dockerfile +++ b/actions/dot-cli/Dockerfile @@ -29,16 +29,6 @@ ENV DOTCMS_CLIENT_SERVERS_DEFAULT=https://demo.dotcms.com/api #now move the file into the dotcms folder located uder the user home folder COPY dot-service.yml ${DOT_SERVICES_HOME} -ARG tkn=$1 - -RUN echo $tkn - -#Replace the token with the value passed in the docker workflow action -RUN sed -i -e "s/token_plchldr/$tkn/g" "${DOT_SERVICES_HOME}dot-service.yml" - -RUN cat "${DOT_SERVICES_HOME}dot-service.yml" - - RUN echo "DOT_CLI_HOME: ${DOT_CLI_HOME}" RUN apt-get update && \ diff --git a/actions/dot-cli/entrypoint.sh b/actions/dot-cli/entrypoint.sh index 407ee78..1c5a16b 100755 --- a/actions/dot-cli/entrypoint.sh +++ b/actions/dot-cli/entrypoint.sh @@ -1,9 +1,20 @@ #!/bin/sh ls /dot-cli + + echo "config::::" + #proof that we can access the repo from within the script cat /github/workspace/README.md + + tkn=$1 + echo $tkn + + #Replace the token with the value passed in the docker workflow action + sed -i -e "s/token_plchldr/$tkn/g" "${DOT_SERVICES_HOME}dot-service.yml" + + echo "$@"; # will echo all args shift; # will remove first arg from the "$@" echo "$@"; # will echo all args except first one