Skip to content

Commit fffa7c5

Browse files
authored
Merge pull request #7 from convox/cache-skip
Allow for running with --no-cache flag
2 parents 5607bc7 + b1a28cb commit fffa7c5

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ This Action [builds](https://docs.convox.com/deployment/builds) an app based on
66
**Required** The name of the [Convox Rack](https://docs.convox.com/introduction/rack) you wish to build against.
77
### `app`
88
**Required** The name of the [app](https://docs.convox.com/deployment/creating-an-application) you wish to build.
9+
### `cached`
10+
**Optional** Whether to utilise the docker cache during the build. Defaults to true.
11+
912
## Outputs
1013
### `release`
1114
The ID of the release that is created when the build completes.

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ inputs:
1111
description:
1212
description: Convox build description
1313
required: false
14+
cached:
15+
description: Whether to utilise the docker cache during the build
16+
required: false
17+
default: true
1418
outputs:
1519
release:
1620
description: Release ID of the created build

entrypoint.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
#!/bin/sh
22
echo "Building"
33
export CONVOX_RACK=$INPUT_RACK
4-
release=$(convox build --app $INPUT_APP --description "$INPUT_DESCRIPTION" --id)
4+
if [ "$INPUT_CACHED" = "false" ]; then
5+
release=$(convox build --app $INPUT_APP --description "$INPUT_DESCRIPTION" --id --no-cache)
6+
else
7+
release=$(convox build --app $INPUT_APP --description "$INPUT_DESCRIPTION" --id)
8+
fi
9+
510
if [ -z "$release" ]
611
then
712
echo "Build failed"

0 commit comments

Comments
 (0)