Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kamaz/deploy-action
Wrapper around GitHub Deployment api for GitHub actions
https://github.com/kamaz/deploy-action
actions automation ci deployment deployment-status github github-ac github-action
Last synced: 1 day ago
JSON representation
Wrapper around GitHub Deployment api for GitHub actions
- Host: GitHub
- URL: https://github.com/kamaz/deploy-action
- Owner: kamaz
- License: mit
- Created: 2020-02-13T21:51:58.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T07:16:25.000Z (about 2 years ago)
- Last Synced: 2025-01-01T05:41:42.330Z (26 days ago)
- Topics: actions, automation, ci, deployment, deployment-status, github, github-ac, github-action
- Language: TypeScript
- Homepage:
- Size: 988 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# deploy action
Action is a wrapper around deployment api.
For detail documentation and explanation refer to:
- [GitHub Deployments API](https://developer.github.com/v3/repos/deployments/)
- [GitHub Deployments API Create Deployment Section](https://developer.github.com/v3/repos/deployments/#create-a-deployment)
- [GitHub Deployments API Create Deployment Status Section](https://developer.github.com/v3/repos/deployments/#create-a-deployment-status)## Inputs
| Input | Optional | Default | Description |
| --------------------- | -------- | ------- | ---------------------- |
| token | No | - | github token |
| deploymentId | Yes | Empty | |
| state | Yes | pending | |
| environmentUrl | Yes | - | |
| requiredContext | Yes | Empty | Format 'value1,value2' |
| autoMerge | Yes | false | |
| environment | Yes | `pr-number` or `qa` | for pull request it default to pr-[number] for push it default to qa |
| transientEnvironment | Yes | false | |
| productionEnvironment | Yes | false | |## Outputs
| Output | Value |
| ------------ | -------------------------------------------------------- |
| deploymentId | a deployment number that can be used to set status later |## Example usage
```yaml
- uses: kamaz/[email protected]
id: deployment
with:
token: ${{ secrets.GITHUB_TOKEN }}
environmentUrl: ${{ format('https://pr-{0}.example.com', github.event.number) }}
#
# Your deployment steps
#
- uses: kamaz/[email protected]
if: success()
with:
deploymentId: ${{ steps.deployment.outputs.deploymentId }}
token: ${{ secrets.GITHUB_TOKEN }}
environmentUrl: ${{ format('https://pr-{0}.example.com', github.event.number) }}
state: success
- uses: kamaz/[email protected]
if: failure()
with:
deploymentId: ${{ steps.deployment.outputs.deploymentId }}
token: ${{ secrets.GITHUB_TOKEN }}
environmentUrl: ${{ format('https://pr-{0}.example.com', github.event.number) }}
state: failure
```