Skip to content

Commit

Permalink
fix(ci): do not try to find a comment to update/create outside a PR, …
Browse files Browse the repository at this point in the history
…in the fuzzing job (closes #483)
  • Loading branch information
SuperFola committed Jul 26, 2024
1 parent 589cf85 commit b6d8b6b
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,17 +242,30 @@ jobs:
-V $FUZZ_TIME_SEC \
-- ${BUILD_FOLDER}/arkscript @@ -L ./lib
- name: Summarize
- uses: 8BitJonny/[email protected]
id: PR

- name: Summarize for PR
id: summary
if: ${{ steps.PR.outputs.number != null }}
shell: bash
run: |
echo "FUZZ_SUMMARY<<EOF" >> $GITHUB_ENV
afl-whatsup -s -d output >> $GITHUB_ENV
afl-showmap -C -i output -o /dev/null -- ./${BUILD_FOLDER}/arkscript @@ -L ./lib | sed -r "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2};?)?)?[mGK]//g" | grep -v Reading | grep -v Scanning >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Summarize
id: summary
if: ${{ steps.PR.outputs.number == null }}
shell: bash
run: |
afl-whatsup -s -d output
afl-showmap -C -i output -o /dev/null -- ./${BUILD_FOLDER}/arkscript @@ -L ./lib
- name: Find Comment
uses: peter-evans/find-comment@v3
if: ${{ steps.PR.outputs.number != null }}
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
Expand All @@ -261,6 +274,7 @@ jobs:

- name: Create or update comment
uses: peter-evans/create-or-update-comment@v4
if: ${{ steps.PR.outputs.number != null }}
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
Expand Down

0 comments on commit b6d8b6b

Please sign in to comment.