From 9a31309b6e310118707c482fd1d146ca17c5da82 Mon Sep 17 00:00:00 2001 From: Eli Segal Date: Mon, 15 Jan 2024 13:57:41 +0200 Subject: [PATCH] Update README.md [skip-ci] --- README.md | 88 ++++++++++++++++++------------------------------------- 1 file changed, 28 insertions(+), 60 deletions(-) diff --git a/README.md b/README.md index e3556b4..caad3b7 100644 --- a/README.md +++ b/README.md @@ -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!