From b241c277d91a3a81bd57881bda4bbecb61d8f4ae Mon Sep 17 00:00:00 2001 From: charliecruzan-stripe <97612659+charliecruzan-stripe@users.noreply.github.com> Date: Tue, 16 Jul 2024 12:04:12 -0700 Subject: [PATCH] [actions] use pagerduty CLI to create alert (#1218) * [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 --- .github/workflows/install-test.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/install-test.yml b/.github/workflows/install-test.yml index 31fd02c0..7efb38d0 100644 --- a/.github/workflows/install-test.yml +++ b/.github/workflows/install-test.yml @@ -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