Skip to content

Commit

Permalink
Add request to set status after integration results commit
Browse files Browse the repository at this point in the history
  • Loading branch information
aspeake committed Jan 13, 2024
1 parent 7aeb10d commit 45dc7a3
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,23 @@ jobs:
git commit -m "Upload results files from CI build"
echo "Pushing to branch: $branch_name"
git push -u origin $branch_name
# Set status checks to success
checks=("code-quality-checks" "python-tests (3.8)" "python-tests (3.9)" "python-tests (3.10)")
commit_sha=$(git rev-parse HEAD)
status_url="https://api.github.com/repos/${{ github.repository }}/statuses/$commit_sha"
for check in "${checks[@]}"; do
curl -L \
-X POST \
$status_url \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}" \
-d '{
"state": "success",
"context": "'"${check}"'",
"target_url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}'
done
fi
stop-runner:
Expand Down

0 comments on commit 45dc7a3

Please sign in to comment.