Skip to content

Commit

Permalink
Add manifest path option on convox deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
Twsouza committed Apr 19, 2023
1 parent 05a3537 commit 8ff2cef
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ The Deploy action performs the functions of combining the [Build](https://github
**Optional** The host name of your [Convox Console](https://docs.convox.com/introduction/console). This defaults to `console.convox.com` and only needs to be overwritten if you have a [self-hosted console](https://docs.convox.com/reference/hipaa-compliance#run-a-private-convox-console)
### `cached`
**Optional** Whether to utilise the docker cache during the build. Defaults to true.
### `manifest`
**Optional** Use a custom path for your convox.yml


## Example Usage
Expand All @@ -30,10 +32,10 @@ Convox provides a full set of Actions to enable a wide variety of deployment wor
Authenticates your Convox account You should run this action as the first step in your workflow
### [Build](https://github.com/convox/action-build)
Builds an app and creates a release which can be promoted later
### [Run](https://github.com/convox/action-run)
### [Run](https://github.com/convox/action-run)
Runs a command (such as a migration) using a previously built release before or after it is promoted
### [Promote](https://github.com/convox/action-promote)
Promotes a release
Promotes a release

Example workflow building a Rails app and running migrations before deploying:
```
Expand Down Expand Up @@ -77,4 +79,4 @@ jobs:
release: ${{ steps.build.outputs.release }}
```
```
5 changes: 4 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ inputs:
description: Whether to utilise the docker cache during the build
required: false
default: true
manifest:
description: Use a custom path for your convox.yml
required: false
runs:
using: docker
image: Dockerfile
image: Dockerfile
15 changes: 12 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,17 @@ then
export CONVOX_HOST=$INPUT_HOST
fi
export CONVOX_RACK=$INPUT_RACK

# Initialize variables for the command options
CACHED_COMMAND=""
MANIFEST_COMMAND=""

if [ "$INPUT_CACHED" = "false" ]; then
convox deploy --app $INPUT_APP --description "$INPUT_DESCRIPTION" --no-cache --wait
else
convox deploy --app $INPUT_APP --description "$INPUT_DESCRIPTION" --wait
CACHED_COMMAND="--no-cache"
fi

if [ "$INPUT_MANIFEST" != "" ]; then
MANIFEST_COMMAND="-m $INPUT_MANIFEST"
fi

convox deploy --app $INPUT_APP --description "$INPUT_DESCRIPTION" $CACHED_COMMAND $MANIFEST_COMMAND --wait

0 comments on commit 8ff2cef

Please sign in to comment.