diff --git a/.github/workflows/flash_analysis.yml b/.github/workflows/flash_analysis.yml index 2b0f9784f2c..0798bd4d08b 100644 --- a/.github/workflows/flash_analysis.yml +++ b/.github/workflows/flash_analysis.yml @@ -155,12 +155,26 @@ jobs: V6X-SUMMARY-MAP-PERC: ${{ fromJSON(fromJSON(needs.analyze_flash.outputs.px4_fmu-v6x-bloaty-summary-map).vm-percentage) }} if: github.event.pull_request steps: + - name: Find Comment + uses: peter-evans/find-comment@v4 + id: fc + with: + issue-number: ${{ github.event.pull_request.number }} + comment-author: 'github-actions[bot]' + body-includes: '' + - name: Set Build Time id: bt run: | echo "timestamp=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_OUTPUT - name: Write pr-comment artifact + # Skip only when the diff is exactly 0 bytes on all targets and no comment exists yet. + # This can't be moved to the job-level conditions, as GH actions don't allow a job-level if condition to access the env. + if: | + steps.fc.outputs.comment-id != '' || + env.V5X-SUMMARY-MAP-ABS != 0 || + env.V6X-SUMMARY-MAP-ABS != 0 run: | mkdir -p pr-comment cat > pr-comment/manifest.json <