-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve log_url by requiring context data to be specified (#3)
* Add required run_id input to improve log_url * Add deployment_status_url input * Make status input required Closes #3
- Loading branch information
1 parent
750b77d
commit 06e6b80
Showing
3 changed files
with
36 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,10 +6,12 @@ This action lets you easily update status of a Deployment on GitHub. Learn more | |
|
||
| Name | Required | Default value | Description | | ||
|-----------------|----------|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| status | no | `in_progress` | Desired status of the Deployment. Can be one of `error`, `failure`, `inactive`, `in_progress`, `queued`, `pending` or `success` | | ||
| run_id | **yes** | | Set this to `${{ github.run_id }}` so the deployment status log URL can be properly set. | | ||
| status | **yes** | | Desired status of the Deployment. Can be one of `error`, `failure`, `inactive`, `in_progress`, `queued`, `pending` or `success` | | ||
| description | no | <empty string> | A short description of the status. The maximum description length is 140 characters. | | ||
| auto_inactive | no | true | Adds a new inactive status to all prior non-transient, non-production environment deployments with the same repository and environment name as the created status's deployment. An inactive status is only added to deployments that had a success state. | | ||
| environment_url | no | <empty string> | Sets the URL for accessing your environment. | | ||
| deployment_status_url | no | (loaded from event) | Explicitly specify the deployment status URL to post the deployment status to. Normally, this will be auto-detected from the GitHub Actions [`DeploymentEvent`](https://developer.github.com/v3/activity/events/types/#deploymentevent) payload. However, if you are runnning from another event type or want to override the deployment to update, you can manually specify the full `https://api.github.com/repos/:owner/:repo/deployments/:deployment_id/statuses` URL here. | | ||
|
||
## Action outputs | ||
|
||
|
@@ -38,7 +40,10 @@ jobs: | |
- uses: actions/checkout@v1 | ||
- id: set_state_in_progress | ||
name: Set deployment status to [in_progress] | ||
uses: rsotnychenko/[email protected] | ||
uses: rsotnychenko/[email protected] | ||
with: | ||
run_id: ${{ github.run_id }} | ||
status: in_progress | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Deploy to GAE | ||
|
@@ -51,9 +56,10 @@ jobs: | |
- id: set_state_final | ||
if: always() | ||
name: Set deployment status | ||
uses: rsotnychenko/deployment-status-update@0.1.3 | ||
uses: rsotnychenko/deployment-status-update@0.2.0 | ||
with: | ||
status: ${{ job.status }} | ||
run_id: ${{ github.run_id }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# TODO: Add rollback operations | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters