Skip to content

Commit a231115

Browse files
Copilotjoshblack
andauthored
ci: handle github-ui dispatch failures
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
1 parent 39daf94 commit a231115

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/recommend-integration-tests.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,12 @@ jobs:
9191
run: |
9292
echo "Requesting github-ui integration tests for primer/react#$PR_NUMBER"
9393
# prc-pr is the github-ui workflow input for the primer/react pull request number.
94-
gh workflow run primer-npm-packages-integration.yml -R github/github-ui --ref main --field prc-pr="$PR_NUMBER"
95-
echo "Requested github-ui integration tests for primer/react#$PR_NUMBER"
94+
if gh workflow run primer-npm-packages-integration.yml -R github/github-ui --ref main --field prc-pr="$PR_NUMBER"; then
95+
echo "Requested github-ui integration tests for primer/react#$PR_NUMBER"
96+
else
97+
echo "::error::Failed to request github-ui integration tests for primer/react#$PR_NUMBER"
98+
exit 1
99+
fi
96100
env:
97101
# Use GITHUB_TOKEN so this fails closed if Actions cannot access github-ui.
98102
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)