Code Monkey home page Code Monkey logo

pagerduty-change-events-action's Introduction

PagerDuty Change Events GitHub Action

This action creates a PagerDuty change event. 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. 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

on:
  push:
    branches:
      - master
      - main
  pull_request:
    branches:
      - master
      - main
    types:
      - closed

jobs:
  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:

on:
  push:
    branches:
      - master
      - main

jobs:
  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: stempler/pagerduty-change-events-action@master
        with:
          integration-key: ${{ secrets.PAGERDUTY_CHANGE_INTEGRATION_KEY }}
          custom-event: Deployment ${{ steps.check.outputs.status }}

pagerduty-change-events-action's People

Contributors

adamvaughan avatar jjm avatar stempler avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.