Skip to content

Commit

Permalink
Add branch as input
Browse files Browse the repository at this point in the history
  • Loading branch information
lorismaz committed Oct 20, 2020
1 parent 0ea565d commit 0af9f28
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Use these inputs to customise the action.
Input Name | Default | Required? | Description
------------ | ------------- | ------------ | -------------
deploy_key | N/A | Y | The Hatchbox project deploy key
deploy_key | master | N | The branch that needs to be deployed

#### Example

Expand All @@ -26,4 +27,5 @@ jobs:
- uses: lorismaz/github-hatchbox-deploy-action@v1
with:
deploy_key: ${{ secrets.HATCHBOX_DEPLOY_KEY }}
branch: master
```
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ inputs:
deploy_key:
description: 'The Hatchbox project deploy key'
required: true
branch:
description: 'The branch that needs to be deployed'
required: false
default: 'master'

runs:
using: 'docker'
image: 'Dockerfile'
args:

- ${{ inputs.deploy_key }}
- ${{ inputs.branch }}
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh -l

curl -sS \
https://www.hatchbox.io/webhooks/custom/push/$INPUT_DEPLOY_KEY?ref=refs%2Fheads%2F${GITHUB_REF##*/}
https://www.hatchbox.io/webhooks/custom/push/$INPUT_DEPLOY_KEY?ref=refs%2Fheads%2F$INPUT_BRANCH

0 comments on commit 0af9f28

Please sign in to comment.