Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #4 from pennsignals/add_docker_publish
Browse files Browse the repository at this point in the history
remove INPUT_ from ENV VARs
  • Loading branch information
darrylmendillo authored Dec 17, 2020
2 parents 752e344 + b84c70c commit 3f9cb90
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
6 changes: 3 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ inputs:
runs:
using: "docker"
image: "Dockerfile"
args:
- ${{ inputs.addr }}
- ${{ inputs.config }}
env:
CONSUL_ADDR: ${{ inputs.addr }}
DEPLOY_CONFIG: ${{ inputs.config }}
10 changes: 4 additions & 6 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#!/bin/sh

# echo all the variabls
echo "INPUT_ADDR: $INPUT_ADDR"
echo "INPUT_CONFIG: $INPUT_CONFIG"

DEPLOY_CONFIG="$INPUT_CONFIG"
echo "CONSUL_ADDR: $CONSUL_ADDR"
echo "DEPLOY_CONFIG: $DEPLOY_CONFIG"

# parse DEPLOY_CONFIG file and build VAULT_PATH
DEPLOY=$(yq read $DEPLOY_CONFIG 'deploy')
Expand All @@ -23,7 +21,7 @@ for SERVICE in $(echo $SERVICES | sed "s/,/ /g"); do
CONFIG_FILES=$(find "${CONFIGS_PATH}" -type f -regextype posix-extended -regex "${REGEX}" -and -regex ".*.${DEPLOY}.*")

# submit all found config files to consul
echo "/scripts/submit_to_consul.sh --path ${CONSUL_PATH} --address ${INPUT_ADDR} --deploy ${DEPLOY} --service "${SERVICE}" ${CONFIG_FILES}"
/scripts/submit_to_consul.sh --path "${CONSUL_PATH}" --address "${INPUT_ADDR}" --deploy "${DEPLOY}" --service "${SERVICE}" "${CONFIG_FILES}"
echo "/scripts/submit_to_consul.sh --path ${CONSUL_PATH} --address ${CONSUL_ADDR} --deploy ${DEPLOY} --service "${SERVICE}" ${CONFIG_FILES}"
/scripts/submit_to_consul.sh --path "${CONSUL_PATH}" --address "${CONSUL_ADDR}" --deploy "${DEPLOY}" --service "${SERVICE}" "${CONFIG_FILES}"

done

0 comments on commit 3f9cb90

Please sign in to comment.