slachiewicz opened a new pull request, #300:
URL: https://github.com/apache/maven-gh-actions-shared/pull/300

   `setup-maven-version` runs for a `push`, or for a `pull_request` whose head 
is a **fork**:
   
   ```yaml
   if: >
     (github.event_name == 'push' || (github.event_name == 'pull_request' && 
github.event.pull_request.head.repo.fork)) && ...
   ```
   
   A pull request opened from a branch in the repository itself skips it — 
which is the point, the `push` run already covers that commit. Every job 
needing its outputs should skip with it.
   
   `fail-fast-build` does, because its `if: inputs.ff-run` has no status 
function and a skipped `needs` propagates normally.
   
   `verify` does not, when a caller sets `ff-run: false`:
   
   ```yaml
   if: >
     (!cancelled()) && inputs.matrix-enabled && ( !inputs.ff-run || 
needs.fail-fast-build.result == 'success' ) && ...
   ```
   
   `!inputs.ff-run` satisfies the second clause on its own, and `!cancelled()` 
is a status function, so it overrides the skip that a skipped dependency would 
otherwise cause. `verify` therefore starts, and its matrix asks for
   
   ```yaml
   maven: ${{ fromJSON( needs.setup-maven-version.outputs.maven-matrix ) }}
   ```
   
   from a job that never ran.
   
   This adds `needs.setup-maven-version.result == 'success'` to the condition. 
`verify` cannot build without those outputs under any circumstances, so this 
only states what the matrix already assumes; runs where `setup-maven-version` 
succeeds are unaffected.
   
   Callers that leave `ff-run` at its default are not exposed, because the 
`fail-fast-build.result == 'success'` clause already covers them. In the Maven 
tree `maven-doxia-site` is the one caller I found setting `ff-run: false`.
   
   Happy to open the same change against `v4` if wanted.


-- 
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