Skip to content

Commit

Permalink
error on action_required
Browse files Browse the repository at this point in the history
  • Loading branch information
manas-yu committed Nov 13, 2024
1 parent 7653a79 commit 6f364d8
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/comment_coverage_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,18 @@ jobs:
- name: Conclusion Analysis
if: steps.wait-for-coverage.outputs.run-conclusion == 'action_required'
run: |
echo "::warning::Code coverage workflow requires manual approval. After approval, please re-run this workflow to post the coverage report."
echo "::error::First-time contributor workflows require manual approval. After approval, please re-run the comment coverage workflows to post the coverage report."
exit 1
comment_coverage_report:
name: Comment Code Coverage Report
needs: check_code_coverage_completed
permissions:
pull-requests: write

# The expression if: ${{ !cancelled() && needs.check_code_coverage_completed.outputs.conclusion != 'action_required' }}
# ensures that this job only runs if the previous job was not cancelled and does not require manual approval.
# This check prevents running the job unnecessarily when a manual approval is needed.
if: |
!cancelled() &&
needs.check_code_coverage_completed.outputs.conclusion != 'action_required'
# The expression if: ${{ !cancelled() }} runs a job or step regardless of its success or failure while responding to cancellations,
# serving as a cancellation-compliant alternative to if: ${{ always() }} in concurrent workflows.
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
steps:
- name: Find CI workflow run for PR
Expand Down

0 comments on commit 6f364d8

Please sign in to comment.