From bf670b39415e05b7e1f04c99fc907ebb39af0d78 Mon Sep 17 00:00:00 2001 From: Yahan Xing Date: Wed, 8 Jul 2026 15:25:51 -0700 Subject: [PATCH 1/4] Fix curl install test: use POSIX-compatible set flags The install script used `set -euo pipefail` under `#!/bin/sh`, but `pipefail` is a bash extension unsupported by dash (Ubuntu's /bin/sh), causing the CI job to exit with code 2. Switch to `set -eu` which is POSIX-compliant. Also initialize NEEDS_SOURCE=false to prevent unset variable errors under `set -u`. Co-Authored-By: Claude Opus 4.6 Committed-By-Agent: claude --- .github/workflows/curl-install-test.yml | 44 +++++++++++++++++++++++++ scripts/install.sh | 3 +- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/curl-install-test.yml diff --git a/.github/workflows/curl-install-test.yml b/.github/workflows/curl-install-test.yml new file mode 100644 index 00000000..e9b5d402 --- /dev/null +++ b/.github/workflows/curl-install-test.yml @@ -0,0 +1,44 @@ +on: + workflow_dispatch: + inputs: + dryrun: + description: 'Skip PagerDuty alert on failure' + type: boolean + default: true + schedule: + - cron: '*/10 * * * *' # Every 10 minutes +name: Curl install test +permissions: + contents: read +jobs: + curl-install-macos: + runs-on: macos-latest + steps: + - run: | + curl -sSL https://raw.githubusercontent.com/stripe/stripe-cli/master/scripts/install.sh | sh + export PATH="$HOME/.stripe/bin:$PATH" + stripe --version + + curl-install-linux: + runs-on: ubuntu-latest + steps: + - run: | + curl -sSL https://raw.githubusercontent.com/stripe/stripe-cli/master/scripts/install.sh | sh + export PATH="$HOME/.stripe/bin:$PATH" + stripe --version + + notify: + runs-on: ubuntu-latest + needs: [curl-install-macos, curl-install-linux] + if: always() + steps: + - uses: actions/checkout@v6 + with: + sparse-checkout: | + scripts/notify.sh + sparse-checkout-cone-mode: false + - run: bash scripts/notify.sh + env: + OVERALL_RESULT: ${{ contains(needs.*.result, 'failure') && 'failure' || 'success' }} + PAGERDUTY_INTEGRATION_KEY: ${{ secrets.PAGERDUTY_INTEGRATION_KEY }} + DRYRUN: ${{ inputs.dryrun }} diff --git a/scripts/install.sh b/scripts/install.sh index 751290fa..94399c27 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -1,8 +1,9 @@ #!/bin/sh -set -euo pipefail +set -eu INSTALL_DIR="${STRIPE_INSTALL_DIR:-$HOME/.stripe/bin}" GITHUB_REPO="stripe/stripe-cli" +NEEDS_SOURCE=false main() { detect_platform From 8d167c6341a0965415efea9209f4a522b322f1c3 Mon Sep 17 00:00:00 2001 From: Yahan Xing Date: Fri, 10 Jul 2026 15:51:34 -0700 Subject: [PATCH 2/4] tmp: add push trigger and use branch script for CI testing Temporary changes to validate the workflow on this branch: - Add push trigger for yx-0708-1 - Use ${{ github.sha }} instead of master for install script URL Will revert to master URL and remove push trigger before merge. Co-Authored-By: Claude Opus 4.6 Committed-By-Agent: claude --- .github/workflows/curl-install-test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/curl-install-test.yml b/.github/workflows/curl-install-test.yml index e9b5d402..2b31fd6a 100644 --- a/.github/workflows/curl-install-test.yml +++ b/.github/workflows/curl-install-test.yml @@ -1,4 +1,6 @@ on: + push: + branches: [yx-0708-1] # temporary, remove before merge workflow_dispatch: inputs: dryrun: @@ -15,7 +17,7 @@ jobs: runs-on: macos-latest steps: - run: | - curl -sSL https://raw.githubusercontent.com/stripe/stripe-cli/master/scripts/install.sh | sh + curl -sSL https://raw.githubusercontent.com/stripe/stripe-cli/${{ github.sha }}/scripts/install.sh | sh export PATH="$HOME/.stripe/bin:$PATH" stripe --version @@ -23,7 +25,7 @@ jobs: runs-on: ubuntu-latest steps: - run: | - curl -sSL https://raw.githubusercontent.com/stripe/stripe-cli/master/scripts/install.sh | sh + curl -sSL https://raw.githubusercontent.com/stripe/stripe-cli/${{ github.sha }}/scripts/install.sh | sh export PATH="$HOME/.stripe/bin:$PATH" stripe --version From 9ae1ac46adf75a6ac9efefcf25761b3d83394d57 Mon Sep 17 00:00:00 2001 From: Yahan Xing Date: Fri, 10 Jul 2026 15:56:27 -0700 Subject: [PATCH 3/4] Fix notify job: pass required PagerDuty env vars The notify.sh script requires PAGERDUTY_DEDUP_KEY, PAGERDUTY_SUMMARY, PAGERDUTY_RESOLVE_SUMMARY, and PAGERDUTY_SEVERITY. These were missing from the curl-install-test workflow. Co-Authored-By: Claude Opus 4.6 Committed-By-Agent: claude --- .github/workflows/curl-install-test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/curl-install-test.yml b/.github/workflows/curl-install-test.yml index 2b31fd6a..74be8a59 100644 --- a/.github/workflows/curl-install-test.yml +++ b/.github/workflows/curl-install-test.yml @@ -43,4 +43,8 @@ jobs: env: OVERALL_RESULT: ${{ contains(needs.*.result, 'failure') && 'failure' || 'success' }} PAGERDUTY_INTEGRATION_KEY: ${{ secrets.PAGERDUTY_INTEGRATION_KEY }} + PAGERDUTY_DEDUP_KEY: gh-actions-stripe-cli-curl-install-test + PAGERDUTY_SUMMARY: "Failed to install Stripe CLI via curl install script. Investigate here: https://github.com/stripe/stripe-cli/actions/workflows/curl-install-test.yml" + PAGERDUTY_RESOLVE_SUMMARY: "Stripe CLI curl install script is passing again" + PAGERDUTY_SEVERITY: critical DRYRUN: ${{ inputs.dryrun }} From b03d88bd633faca1b76cfa97c43e4bf5f727dbe1 Mon Sep 17 00:00:00 2001 From: Yahan Xing Date: Fri, 10 Jul 2026 16:03:06 -0700 Subject: [PATCH 4/4] Remove temporary push trigger, restore master URL, disable PD alerts - Remove push trigger (testing complete) - Restore master URL for install script - Hardcode DRYRUN=true until confirmed stable on schedule Co-Authored-By: Claude Opus 4.6 Committed-By-Agent: claude --- .github/workflows/curl-install-test.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/curl-install-test.yml b/.github/workflows/curl-install-test.yml index 74be8a59..c1670142 100644 --- a/.github/workflows/curl-install-test.yml +++ b/.github/workflows/curl-install-test.yml @@ -1,6 +1,4 @@ on: - push: - branches: [yx-0708-1] # temporary, remove before merge workflow_dispatch: inputs: dryrun: @@ -17,7 +15,7 @@ jobs: runs-on: macos-latest steps: - run: | - curl -sSL https://raw.githubusercontent.com/stripe/stripe-cli/${{ github.sha }}/scripts/install.sh | sh + curl -sSL https://raw.githubusercontent.com/stripe/stripe-cli/master/scripts/install.sh | sh export PATH="$HOME/.stripe/bin:$PATH" stripe --version @@ -25,7 +23,7 @@ jobs: runs-on: ubuntu-latest steps: - run: | - curl -sSL https://raw.githubusercontent.com/stripe/stripe-cli/${{ github.sha }}/scripts/install.sh | sh + curl -sSL https://raw.githubusercontent.com/stripe/stripe-cli/master/scripts/install.sh | sh export PATH="$HOME/.stripe/bin:$PATH" stripe --version @@ -47,4 +45,4 @@ jobs: PAGERDUTY_SUMMARY: "Failed to install Stripe CLI via curl install script. Investigate here: https://github.com/stripe/stripe-cli/actions/workflows/curl-install-test.yml" PAGERDUTY_RESOLVE_SUMMARY: "Stripe CLI curl install script is passing again" PAGERDUTY_SEVERITY: critical - DRYRUN: ${{ inputs.dryrun }} + DRYRUN: "true" # TODO: switch to ${{ inputs.dryrun }} once confirmed stable