Skip to content

Commit

Permalink
fix replacing token
Browse files Browse the repository at this point in the history
  • Loading branch information
fabrizzio-dotCMS committed Sep 11, 2023
1 parent 8789939 commit 6f4c765
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
10 changes: 0 additions & 10 deletions actions/dot-cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand Down
11 changes: 11 additions & 0 deletions actions/dot-cli/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 6f4c765

Please sign in to comment.