Skip to content

Commit

Permalink
Merge pull request #1261 from qstokkink/fix_validationstatus_setting
Browse files Browse the repository at this point in the history
Fixed validation action errors
  • Loading branch information
qstokkink authored Jan 16, 2024
2 parents 27650c1 + 48e1465 commit a1b4173
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/pr-comment-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ jobs:
pr_commented:
name: Validate PR
if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, 'validate') }}
needs: set_pending_status
strategy:
matrix:
os: [ubuntu-latest, windows-latest] # macos-latest not tested due to crashing.
Expand Down Expand Up @@ -37,7 +38,8 @@ jobs:
run: |
{
echo 'actual_pull_head<<EOF'
git ls-remote origin refs/pull/${{ github.event.issue.number }}/head | grep -o "^\w*\b"
git ls-remote https://github.com/Tribler/py-ipv8/ refs/pull/${{ github.event.issue.number }}/head | grep -o "^\w*\b"
echo
echo EOF
} >> "$GITHUB_ENV"
- name: Set commit pending status
Expand All @@ -48,6 +50,7 @@ jobs:
description: 'Pending..'
state: 'pending'
sha: ${{ env.actual_pull_head }}
target_url: https://github.com/Tribler/py-ipv8/actions/runs/${{ github.run_id }}

set_failure_status:
if: ${{failure() && github.event.issue.pull_request && startsWith(github.event.comment.body, 'validate') }}
Expand All @@ -62,6 +65,7 @@ jobs:
description: 'Failed!'
state: 'failure'
sha: ${{ env.actual_pull_head }}
target_url: https://github.com/Tribler/py-ipv8/actions/runs/${{ github.run_id }}

set_success_status:
if: ${{!failure() && github.event.issue.pull_request && startsWith(github.event.comment.body, 'validate') }}
Expand All @@ -76,3 +80,4 @@ jobs:
description: 'Success!'
state: 'success'
sha: ${{ env.actual_pull_head }}
target_url: https://github.com/Tribler/py-ipv8/actions/runs/${{ github.run_id }}

0 comments on commit a1b4173

Please sign in to comment.