Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Delete QNS PR comment on successful run #1807

Merged
merged 5 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/actions/pr-comment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ inputs:
name:
description: 'Artifact name to import comment data from.'
required: true
mode:
description: 'Mode of operation (upsert/recreate/delete).'
required: true
token:
description: 'A Github PAT'
required: true
Expand Down
7 changes: 2 additions & 5 deletions .github/actions/quic-interop-runner/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,9 @@ runs:
- name: Format GitHub comment
if: always()
run: |
if [ -s quic-interop-runner/summary ]; then
exit 0
fi
echo '[**QUIC Interop Runner**](https://github.com/quic-interop/quic-interop-runner)' >> comment
echo '' >> comment
# Ignore all, but table, which starts with "|".
# Ignore all, but table, which starts with "|". Also reformat it to GitHub Markdown.
grep -E '^\|' quic-interop-runner/summary |\
awk '(!/^\| *:-/ || (d++ && d < 3))' |\
sed -E -e 's/✓/:white_check_mark:/gi' -e 's/✕/:x:/gi' -e 's/\?/:grey_question:/gi' \
Expand All @@ -106,7 +103,7 @@ runs:
shell: bash

- name: Export PR comment data
if: env.EXPORT_COMMENT == '1'
if: always()
uses: ./.github/actions/pr-comment-data-export
with:
name: qns
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/bench-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ jobs:
- uses: ./.github/actions/pr-comment
with:
name: bench
mode: upsert
token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/qns-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
pull-requests: write
runs-on: ubuntu-latest
if: |
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'failure'
github.event.workflow_run.event == 'pull_request'
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/pr-comment
with:
name: qns
mode: ${{ github.event.workflow_run.conclusion == 'success' && 'delete' || 'upsert' }}
token: ${{ secrets.GITHUB_TOKEN }}
Loading