Skip to content

Commit

Permalink
Merge branch 'master' into releases/v1
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Oosterveld committed Nov 29, 2019
2 parents 1f76aa9 + f7fe063 commit 7a81fc6
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 6 deletions.
32 changes: 30 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,34 @@

# Create a Deployment via GitHub Deployments API

https://developer.github.com/v3/repos/deployments/
See https://developer.github.com/v3/repos/deployments/

https://octokit.github.io/rest.js/
## Usage

```workflow
name: 'Create Deployment'
on:
push:
branches:
- master
jobs:
create-deplyment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Generate VERSION
run: echo "::set-env name=VERSION::$(git describe --tags --always --dirty)"
- name: Create Deployment
id: deploy
uses: abendigo/create-deployment@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
payload: ${{ env.VERSION }}
- name: Get the deplopyment ID
run: echo "The deployment ID was ${{ steps.deploy.outputs.id }}"
```

## License

All scripts and documentation in this project are released under the [MIT License](LICENSE).
11 changes: 7 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
name: 'Create Deployment'
description: 'Create a Deployment via GITHUB Deployment API'
name: 'Create GitHub API Deployment'
brand:
icon: 'download-cloud'
color: 'orange'
description: 'Create a Deployment via the GitHub API'
inputs:
token:
description: 'This should be a token with access to your repository scoped in as a secret'
required: true
ref:
description: The ref to deploy. This can be a branch, tag, or SHA.
Defaults to the value of ???
Defaults to the value of ${GITHUB_GITHUB_REPOSITORY}
required: false
task:
description: 'Specifies a task to execute (e.g., deploy or deploy:migrations)'
Expand All @@ -22,7 +25,7 @@ inputs:
required: false
outputs:
id:
description: 'The time we greeted you'
description: 'The ID of the Deployment'
runs:
using: 'node12'
main: 'dist/index.js'

0 comments on commit 7a81fc6

Please sign in to comment.