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 6f4c765 commit d2542fd
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
uses: ./actions/dot-cli
id: dot-cli
with:
token: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhcGk4YjE2ZWJkYy03MjUzLTRjYmMtOTk5OC1mNmNmNmRmYzRiNjUiLCJ4bW9kIjoxNjk0NDQyMjQyMDAwLCJuYmYiOjE2OTQ0NDIyNDIsImlzcyI6IjRhZmYwZGZiMDciLCJsYWJlbCI6ImNsaS10ZXN0IiwiZXhwIjoxNzg5MTA2NDAwLCJpYXQiOjE2OTQ0NDIyNDIsImp0aSI6ImIyZTMzZDMyLWQ0NGQtNDI0NC1hM2QwLTc3YzZkY2UzNGNlNSJ9.uEkyMzS8LDlrlvLsrdOAPGUXj3F3GNZ-WhuA7ZYixxw'
pass: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhcGkwM2ZiY2ZjZi04ZDA2LTQ5ZTUtYTUwZC1mYTY1Yzk4NGI4YjQiLCJ4bW9kIjoxNjk0NDY5MTA5MDAwLCJuYmYiOjE2OTQ0NjkxMDksImlzcyI6IjRhZmYwZGZiMDciLCJsYWJlbCI6ImNsaSIsImV4cCI6MTc4OTEwNjQwMSwiaWF0IjoxNjk0NDY5MTA5LCJqdGkiOiIxYmI5YjhjNC1lZTcwLTRiMmYtYjFjNC0wYWY3NTMzNmM0MGQifQ.y6s9pXsMnavzoGD-FkMLpKEXEBIhB8QtP3n5EYFzQF4'
command: 'ct'
sub-command: 'pull'
default-action-arg: 'FileAsset'
Expand Down
6 changes: 3 additions & 3 deletions actions/dot-cli/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
name: 'dot-cli'
description: 'Fire dotCMS cli'
inputs:
token:
description: 'dotCMS token'
pass:
description: 'safe pass'
required: true
command:
description: 'dot-cli command'
Expand All @@ -28,7 +28,7 @@ runs:
using: 'docker'
image: 'Dockerfile'
args: # 'ct pull FileAsset --workspace /github/workspace/'
- ${{ inputs.token }}
- ${{ inputs.pass }}
- ${{ inputs.command }}
- ${{ inputs.sub-command }}
- ${{ inputs.default-action-arg }}
Expand Down
2 changes: 1 addition & 1 deletion actions/dot-cli/dot-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
active: true
credentials:
user: "[email protected]"
token: "token_plchldr"
token: "plchldr"
4 changes: 2 additions & 2 deletions actions/dot-cli/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
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"
#Replace the safe-pass with the value passed in the docker workflow action
sed -i -e "s/plchldr/$tkn/g" "${DOT_SERVICES_HOME}dot-service.yml"


echo "$@"; # will echo all args
Expand Down

0 comments on commit d2542fd

Please sign in to comment.