Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/PagerDuty/pagerduty-change-events-action
A GitHub action that creates a PagerDuty change event.
https://github.com/PagerDuty/pagerduty-change-events-action
renovate-enabled team-service-intelligence
Last synced: 7 days ago
JSON representation
A GitHub action that creates a PagerDuty change event.
- Host: GitHub
- URL: https://github.com/PagerDuty/pagerduty-change-events-action
- Owner: PagerDuty
- Created: 2020-11-12T15:54:35.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-10-08T11:03:46.000Z (about 1 month ago)
- Last Synced: 2024-10-31T10:42:55.069Z (12 days ago)
- Topics: renovate-enabled, team-service-intelligence
- Language: JavaScript
- Homepage: https://pagerduty.com
- Size: 689 KB
- Stars: 9
- Watchers: 43
- Forks: 8
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PagerDuty Change Events GitHub Action
This action creates a PagerDuty [change event](https://support.pagerduty.com/docs/change-events). Change events help
you track deploys, build completion, configuration updates, etc., providing contextual information that is critical during incident triage.## Getting Started
Before you can use this action you'll need to have a PagerDuty service configured with an integration. To add a
GitHub integration to your service, follow [these instructions](https://support.pagerduty.com/docs/github-changes#in-pagerduty). Upon completing those steps you should receive an integration key that you can use with this action.Currently only `push` and `pull_request` events are handled, and for `pull_request` events, a change event will only be created
when the pull request is merged. You can choose which event and which branches change events should be created for in your
workflow configuration.## Inputs
### `integration-key`
**Required** The integration key that identifies the PagerDuty service the change was made to, added as a GitHub secret for the repository.
### `custom-event`
Custom event summary. If provided the GitHub event type is ignored and the given summary used. A link to the run is included in the change event.
## Example usage
```yaml
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
types:
- closedjobs:
send-pagerduty-change-event:
runs-on: ubuntu-latest
name: Sending PagerDuty Change Event
steps:
- name: Create a change event
uses: PagerDuty/pagerduty-change-events-action@master
with:
integration-key: ${{ secrets.PAGERDUTY_CHANGE_INTEGRATION_KEY }}
```### Custom event
Custom events can for instance be used for notifying about the result of a job:
```yaml
on:
push:
branches:
- master
- mainjobs:
deploy:
runs-on: ubuntu-latest
name: Deploying the application (dummy)
steps:
- name: Dummy step
run: echo "Dummy deployment"notification:
runs-on: ubuntu-latest
name: Notify PagerDuty
needs: [deploy]
if: always()
steps:
# make deploy job status available
# see https://github.com/marketplace/actions/workflow-status-action
- uses: martialonline/workflow-status@v3
id: check
- name: Create a change event
uses: PagerDuty/pagerduty-change-events-action@master
with:
integration-key: ${{ secrets.PAGERDUTY_CHANGE_INTEGRATION_KEY }}
custom-event: Deployment ${{ steps.check.outputs.status }}
```