Skip to content

Commit

Permalink
successful workflow jobs to post a corresponding commit status
Browse files Browse the repository at this point in the history
  • Loading branch information
Thesephi committed Aug 22, 2023
1 parent bff9838 commit dd6084a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
branches-ignore: [ "master", "dependabot/*" ]

jobs:
build:
test:

runs-on: ubuntu-latest

Expand All @@ -27,3 +27,12 @@ jobs:
- run: npm ci
- run: npm run build:prod --if-present # prod build
- run: npm test # test code in both src and dist
- run: gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/$GITHUB_REPOSITORY/statuses/$GITHUB_SHA \
-f state='success' \
-f target_url='$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID' \
-f description='Workflow Job $GITHUB_JOB succeeded!' \
-f context='continuous-integration/github'

0 comments on commit dd6084a

Please sign in to comment.