Skip to content

Commit

Permalink
Merge pull request #7 from convox/cache-skip
Browse files Browse the repository at this point in the history
Allow for running with --no-cache flag
  • Loading branch information
Twsouza authored Mar 28, 2023
2 parents 3fc0ac8 + 4b76e79 commit 05a3537
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ The Deploy action performs the functions of combining the [Build](https://github
**Required** The value of your [Convox Deploy Key](https://docs.convox.com/console/deploy-keys)
### `host`
**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.


## Example Usage
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ inputs:
description:
description: Convox build description
required: false
cached:
description: Whether to utilise the docker cache during the build
required: false
default: true
runs:
using: docker
image: Dockerfile
10 changes: 7 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
echo "Deploying"
if [ -n "$INPUT_PASSWORD" ]
then
export CONVOX_PASSWORD=$INPUT_PASSWORD
export CONVOX_PASSWORD=$INPUT_PASSWORD
fi
if [ -n "$INPUT_HOST" ]
then
export CONVOX_HOST=$INPUT_HOST
export CONVOX_HOST=$INPUT_HOST
fi
export CONVOX_RACK=$INPUT_RACK
convox deploy --app $INPUT_APP --description "$INPUT_DESCRIPTION" --wait
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
fi

0 comments on commit 05a3537

Please sign in to comment.