Skip to content

Commit

Permalink
[actions] use pagerduty CLI to create alert (#1218)
Browse files Browse the repository at this point in the history
* [actions] use pagerduty CLI to create alert

* temporarily force alert to run

* fix auth:set command

* use integration key

* fix multiline input

* keys and values

* correct date

* wrap date in quotes

* add link, only run on failure
  • Loading branch information
charliecruzan-stripe authored Jul 16, 2024
1 parent e2df075 commit b241c27
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/install-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,13 @@ jobs:
runs-on: ubuntu-latest
if: ${{ always() && contains(needs.*.result, 'failure') }}
steps:
- name: Send PagerDuty alert on failure
uses: Entle/action-pagerduty-alert@0.2.0
with:
pagerduty-integration-key: '${{ secrets.PAGERDUTY_INTEGRATION_KEY }}'
pagerduty-dedup-key: package_manager_install_workflow_failed
- shell: bash
env:
PAGERDUTY_INTEGRATION_KEY: ${{ secrets.PAGERDUTY_INTEGRATION_KEY }}
run: |
sh -c "$(curl -sL https://raw.githubusercontent.com/martindstone/pagerduty-cli/master/install.sh)"
pd event alert --routing_key "$PAGERDUTY_INTEGRATION_KEY" \
--summary "Failed to install Stripe CLI on one or more operating systems. Investigate here: https://github.com/stripe/stripe-cli/actions/workflows/install-test.yml" \
--timestamp "\"$(date)\"" \
--source "Stripe CLI GitHub Actions" \
--severity critical

0 comments on commit b241c27

Please sign in to comment.