Skip to content

Commit

Permalink
breaking actions into their own repositories
Browse files Browse the repository at this point in the history
  • Loading branch information
camerondgray committed Nov 13, 2019
0 parents commit 8240d95
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM ubuntu:18.04

LABEL version="1.0.0"
LABEL repository="https://github.com/convox/action-build"
LABEL homepage="https://convox.com/convox"
LABEL maintainer="Convox <[email protected]>"

LABEL "com.github.actions.name"="Convox Build"
LABEL "com.github.actions.description"="Build an app to deploy on Convox"
LABEL "com.github.actions.icon"="cloud"
LABEL "com.github.actions.color"="blue"

RUN apt-get -qq update && apt-get -qq -y install curl

RUN curl -L https://convox.com/cli/linux/convox -o /tmp/convox \
&& mv /tmp/convox /usr/local/bin/convox \
&& chmod 755 /usr/local/bin/convox

COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Convox Build Action
This Action [builds](https://docs.convox.com/deployment/builds) an app based on a [convox.yml](https://docs.convox.com/application/convox-yml) so that app can be deployed on Convox

## Inputs
### `rack`
**Required** The name of the [Convox Rack](https://docs.convox.com/introduction/rack) you wish to build against.
### `app`
**Required** The name of the [app](https://docs.convox.com/deployment/creating-an-application) you wish to build.
## Outputs
### `release`
The ID of the release that is created when the build completes.
## Example usage
```
uses: convox/action-build@v1
with:
rack: staging
app: myapp
```
16 changes: 16 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Convox Build
description: Build a Convox app
author: Convox
inputs:
rack:
description: Convox Rack name
required: true
app:
description: Convox app name
required: true
outputs:
release:
description: Release ID of the created build
runs:
using: docker
image: Dockerfile
6 changes: 6 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
echo "Building"
export CONVOX_RACK=$INPUT_RACK
release=$(convox build --app $INPUT_APP --id)
echo ::set-output name=release::$release
echo ::set-env name=RELEASE::$release

0 comments on commit 8240d95

Please sign in to comment.