Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Marks a deployment status for GitHub actions.
- `state`: Deployment state. (default: pending)
- `description`: Descriptive message about the deployment state.
- `log-url`: Log url location.
- `deployment-id`: Optional deployment ID to provide, if this action was triggered outside of a `deployment` event.
- `token`: Github repository token.
- `environment`: Name for the target deployment environment, which can be changed when setting a deploy status.
- `environment-url`: URL for accessing your environment.
Expand Down
2 changes: 2 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ inputs:
description: 'Github repository token'
log-url:
description: 'Log url location'
deployment-id:
description: 'Optional deployment ID to provide, if this action was triggered outside of a `deployment` event.'
description:
description: 'Descriptive message about the deployment state'
environment:
Expand Down
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ async function run() {
const token = core.getInput("token", {required: true});
const state = core.getInput("state", {required: true});
const url = core.getInput("log-url", {required: false}) || defaultUrl;
const deployment_id = core.getInput("deployment-id", {required: false}) || context.payload.deployment.id;
const description = core.getInput("description", {required: false});
const env = core.getInput("environment", {required: false});
const envUrl = core.getInput("environment-url", {required: false});

const client = new github.GitHub(token);
const params = {
...context.repo,
deployment_id: context.payload.deployment.id,
deployment_id: deployment_id,
state,
log_url: url,
target_url: url,
Expand Down