Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/int128/wait-for-deployment-action
Action to wait for GitHub Deployments of current commit
https://github.com/int128/wait-for-deployment-action
deployment github-actions
Last synced: 3 months ago
JSON representation
Action to wait for GitHub Deployments of current commit
- Host: GitHub
- URL: https://github.com/int128/wait-for-deployment-action
- Owner: int128
- License: apache-2.0
- Created: 2022-09-22T07:48:19.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-19T06:10:39.000Z (4 months ago)
- Last Synced: 2024-10-19T12:48:07.738Z (4 months ago)
- Topics: deployment, github-actions
- Language: TypeScript
- Homepage:
- Size: 5.45 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# wait-for-deployment-action [![ts](https://github.com/int128/wait-for-deployment-action/actions/workflows/ts.yaml/badge.svg)](https://github.com/int128/wait-for-deployment-action/actions/workflows/ts.yaml)
This is an action to wait for the GitHub Deployment.
## Getting Started
To post a comment when all deployments are succeeded,
```yaml
name: wait-for-deployment-succeededon:
pull_request:jobs:
notify:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: int128/wait-for-deployment-action@v1
id: deployment
with:
until: succeeded
deployment-sha: ${{ github.event.pull_request.head.sha || github.sha }}
- uses: int128/comment-action@v1
with:
post: |
## Deploy succeeded
${{ steps.deployment.outputs.summary }}
```### Condition
If `until` is set to `succeeded`,
- When **all** deployments are succeeded, this action exits successfully.
- When **any** deployment is failed, this action exits with an error.If `until` is set to `completed`, this action exits when all deployments are completed.
### Timeout
If `timeout-seconds` is set, this action stops after the timeout.
This action exits successfully even if any deployment is not completed.If both `timeout-seconds` and `until: succeeded` is set, and when any deployment is failed,
this action exits with an error after the timeout.## Specification
This action determines the status as below table.
| GitHub deployment status | Progressing | Succeeded | Failed | Completed |
| ------------------------ | ----------- | --------- | ------ | --------- |
| `queued` | x | - | - | - |
| `in_progress` | x | - | - | - |
| `active` | - | x | - | x |
| `success` | - | x | - | x |
| `failure` | - | - | x | x |
| `error` | - | - | x | x |
| Others | - | - | - | - |x: This action maps the GitHub deployment status to the corresponding column.
### Inputs
| Name | Default | Description |
| ----------------------- | -------------- | --------------------------------- |
| `until` | (required) | Either `completed` or `succeeded` |
| `initial-delay-seconds` | 10 | Initial delay before polling |
| `period-seconds` | 15 | Polling period |
| `timeout-seconds` | - | If set, poll until the timeout |
| `deployment-sha` | (required) | Find deployments by commit |
| `token` | `github.token` | GitHub token |### Outputs
| Name | Description |
| ------------- | ------------------------------------- |
| `progressing` | true if any deployment is progressing |
| `succeeded` | true if all deployments are succeeded |
| `failed` | true if any deployment is failed |
| `completed` | true if all deployments are completed |
| `summary` | markdown list of all deployments |