Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
[skip-ci]
  • Loading branch information
rockem authored Jan 15, 2024
1 parent 029f822 commit 9a31309
Showing 1 changed file with 28 additions and 60 deletions.
88 changes: 28 additions & 60 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,73 +3,41 @@
[![Tests](https://github.com/rockem/create-opsgenie-alert-action/actions/workflows/test.yml/badge.svg)](https://github.com/rockem/create-opsgenie-alert-action/actions/workflows/test.yml)
[![Compile](https://github.com/rockem/create-opsgenie-alert-action/actions/workflows/compile.yml/badge.svg)](https://github.com/rockem/create-opsgenie-alert-action/actions/workflows/compile.yml)

This action uses OpsGenie's Alert API to creates a new alert.
Enhance your team's incident management by seamlessly connecting GitHub Actions with OpsGenie alerts, streamlining the process of identifying and addressing potential issues in your software development pipeline.

## Inputs

##### `api_key`

[**Required**] The api key provided by OpsGenie integration.

##### `alias`

The alias for the alert.

##### `message`

[**Required**] The actual alert message.

##### `source`

Alert's source. default is IP address of incoming request.

##### `priority`

Alert's priority, valid values: P1-P5. Default is P3.

##### `description`

The description for the new alert.

##### `tags`

The tags for the new alert, separated by commas.

##### `using_eu_url`

Default value is false. Must set to true if required OpsGenie API endpoint is 'https://api.eu.opsgenie.com'.
This GitHub Action allows you to create alerts in [OpsGenie](https://www.atlassian.com/software/opsgenie) as part of your GitHub Actions workflows.

## Usage

#### Minimal

```yaml
uses: rockem/create-opsgenie-alert-action@v1
with:
api_key: ${{ secrets.OPSGENIE_API_KEY }}
message: >
Activity exceeded timeout: exceeded 60 seconds
- name: Create OpsGenie Alert
uses: rockem/create-opsgenie-alert-action@v1
with:
api_key: ${{ secrets.OPSGENIE_API_KEY }}
message: >
Activity exceeded timeout: exceeded 60 seconds
alias: "workflow-failure"
source: "GitHub Actions"
```
#### All parameters
### Inputs
```yaml
uses: rockem/create-opsgenie-alert-action@v1
with:
api_key: ${{ secrets.OPSGENIE_API_KEY }}
alias: timeout-alert-alias
message: >
Activity exceeded timeout: exceeded 60 seconds
description: >
This type of message commonly appears in computing scenarios where
processes are expected to finish within a specified timeframe
priority: P2
source: 127.0.0.1
tags: backend,timeout
```
- **\`api_key\`** (Required): Your OpsGenie API key. It is recommended to store this as a secret in your GitHub repository.
- **\`message\`** (Required): The short alert message.
- **\`description\`**: A longer description of the alert.
- **\`alias\`**: A unique identifier for the alert. If not provided, one will be generated based on the timestamp.
- **\`source\`**: The source of the alert. Defaults to IP address of incoming request.
- **\`tags\`**: Tags of the alert, separated by commas.
- **\`priority\`**: Priority level of the alert. Possible values are P1, P2, P3, P4 and P5. Default value is P3.
- **\`using_eu_url\`**: Set the action to use OpsGenie europe endpoint 'https://api.eu.opsgenie.com'. Defaults to false
## Resources
- Create OpsGenie API key: [Create an API integration](https://support.atlassian.com/opsgenie/docs/create-a-default-api-integration/)
- OpsGenie's [AlertAPI](https://docs.opsgenie.com/docs/alert-api)
- Compile files into a single file: [ncc](https://github.com/vercel/ncc)
## License
This project is licensed under the MIT License. See the LICENSE file for details.
---
Feel free to contribute by opening issues or pull requests. If you have any questions or need assistance, please don't hesitate to reach out.
Happy coding!

0 comments on commit 9a31309

Please sign in to comment.