Skip to content

Commit

Permalink
aasdfasfd
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbkoch committed Jul 27, 2024
1 parent 6aa4985 commit 43ffe68
Showing 1 changed file with 10 additions and 20 deletions.
30 changes: 10 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -508,24 +508,14 @@ jobs:
python -m pip install --upgrade black
black --check .
shell: bash
- name: Capture exit code
id: capture_exit_code
run: echo "::set-output name=exitcode::${{ steps.black_check.outcome == 'failure' }}"
- name: Capture black check result
id: capture_result
run: |
if [[ "${{ steps.black_check.outcome }}" == "failure" ]]; then
echo "::set-output name=black_failed::true"
else
echo "::set-output name=black_failed::false"
fi
- name: Mark step with a warning
if: steps.capture_exit_code.outputs.exitcode == 'true'
uses: actions/github-script@v6
with:
script: |
github.rest.checks.create({
owner: context.repo.owner,
repo: context.repo.repo,
name: 'Warning: Step might have failed',
head_sha: context.sha,
status: 'completed',
conclusion: 'neutral',
output: {
title: 'Warning',
summary: 'The previous step failed but the workflow continued.'
}
})
if: steps.capture_result.outputs.black_failed == 'true'
run: echo "Warning: Python code does not match black format"

0 comments on commit 43ffe68

Please sign in to comment.