Copilot commented on code in PR #13079:
URL: https://github.com/apache/maven/pull/13079#discussion_r3959719856


##########
.github/workflows/maven.yml:
##########
@@ -353,6 +353,14 @@ jobs:
             ~/.mimir/*.log
 
   consolidate-caches:
+    # This job downloads the per-job cache artifacts to publish a single 
consolidated
+    # cache. The "Publish cache" step below is already gated to non-PR events, 
so on a
+    # pull_request the job has nothing to publish and only risks a flaky ~2 GB 
artifact
+    # download (actions/download-artifact "failed after 5 retries"). Skip it 
on PRs, and
+    # keep it non-fatal elsewhere: the consolidated cache is best-effort (the 
next run
+    # rebuilds it), so a transient download flake must never fail the whole 
run.
+    if: ${{ github.event_name != 'pull_request' }}

Review Comment:
   GitHub Actions `if:` conditions are already evaluated as expressions, so the 
`${{ }}` wrapper is unnecessary here. Using `if: github.event_name != 
'pull_request'` matches the documented idiom and avoids any ambiguity about 
string vs expression parsing in YAML contexts.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to