Skip to content

Conversation

@prbarna
Copy link

@prbarna prbarna commented Jan 1, 2026

Description

This skips the required jobs in the build workflow if only website changes have been pushed or are in the PR that triggers the workflow run. This should prevent the build jobs from running when not necessary but still allow the PR to merge based on the required checks for the repo.

From https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks

If, however, a job within a workflow is skipped due to a conditional, it will report its status as "Success".

This also relies on the skipped status as described here: https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idneeds

If a job fails or is skipped, all jobs that need it are skipped unless the jobs use a conditional expression that causes the job to continue.

This uses this action to give a boolean on if anything other than the website directory changed: https://github.com/dorny/paths-filter/tree/v3
The filter can be changed as needed but the main call out earlier was for website changes.

Tested over at prbarna#1 with a build job as a required check showing it's mergeable with the skipped build job as a result of only changing the website directory:
Screenshot 2026-01-01 at 12 58 22 PM

Meta

Merge checklist:

  • Pull Request title is short, imperative summary of proposed changes
  • The description documents the what and why
  • If this PR changes behavior or adds a feature, user documentation is updated
  • If this PR touches photon-serde, all messages have been regenerated and hashes have not changed unexpectedly
  • If this PR touches configuration, this is backwards compatible with settings back to v2025.3.2
  • If this PR touches pipeline settings or anything related to data exchange, the frontend typing is updated
  • If this PR addresses a bug, a regression test for it is added

@prbarna prbarna requested a review from a team as a code owner January 1, 2026 19:35
@samfreund
Copy link
Member

I think it might be good to check for changes in docs as well.

build-offline-docs:
name: "Build Offline Docs"
needs: check-for-non-functional-changes
if: needs.check-for-non-functional-changes.outputs.should_run == 'true'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should run if there's changes to the docs directory.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just so I'm clear on the desired change the build-package job that combines the built packages and the docs won't run because the build-gradle will be skipped. We want this to run so we still get the docs as artifacts in that case, right?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, this is a little more complicated than I thought. I guess it mostly depends on if we want to also update JARs when the docs change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants