Skip to content

Commit

Permalink
renamed vars
Browse files Browse the repository at this point in the history
  • Loading branch information
brunocascio committed Dec 12, 2019
1 parent bddd485 commit f8bb3c1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 19 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ This action deploys ECS services using [fabfuel/ecs-deploy](https://github.com/f
## Example usage

```yml
uses: brunocascio/ecs-deploy@latest
uses: brunocascio/ecs-deploy@vX.Y.Z>
with:
cluster-name: theCluster
service-name: theService
task-name: theTaskDefinitionName
container-name: theContainer
cluster: theClusterName
service: theServiceName
task: theTaskDefinitionName
container: theContainerName
```
16 changes: 8 additions & 8 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
name: 'ECS deploy'
description: 'Github action using fabfuel/ecs-deploy script for ecs deployments'
inputs:
cluster-name:
cluster:
description: 'Cluster name where service/task will be deployed'
required: true
service-name:
service:
description: 'Service name of the service/task to be deployed'
required: true
task-name:
task:
description: 'Task definition name to be updated'
required: true
container-name:
container:
description: 'Container name to be updated'
required: true
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.cluster-name }}
- ${{ inputs.service-name }}
- ${{ inputs.task-name }}
- ${{ inputs.container-name }}
- ${{ inputs.cluster }}
- ${{ inputs.service }}
- ${{ inputs.task }}
- ${{ inputs.container }}
8 changes: 2 additions & 6 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@

set -e o pipefail

$(env | grep INPUT_)
env_variables=$(jq -n 'env' | jq --arg CONTAINER "$INPUT_CONTAINER" -r 'keys[] as $k | "-e \($CONTAINER) \($k) \"\(values[$k])\""')

env_variables=$(jq -n 'env' | jq --arg CONTAINER "$INPUT_CONTAINER_NAME" -r 'keys[] as $k | "-e \($CONTAINER) \($k) \"\(values[$k])\""')

command=$(printf "ecs deploy $INPUT_CLUSTER_NAME $INPUT_SERVICE_NAME --task $INPUT_TASK_NAME $env_variables --exclusive-env")

echo $command
command=$(printf "ecs deploy $INPUT_CLUSTER $INPUT_SERVICE --task $INPUT_TASK $env_variables --exclusive-env")

eval $command

0 comments on commit f8bb3c1

Please sign in to comment.