Skip to content

ci: create fallback for tj-actions/changed-files#1146

Merged
doodlum merged 1 commit into
community-shaders:devfrom
alandtse:changed-files
Jun 15, 2025
Merged

ci: create fallback for tj-actions/changed-files#1146
doodlum merged 1 commit into
community-shaders:devfrom
alandtse:changed-files

Conversation

@alandtse
Copy link
Copy Markdown
Collaborator

@alandtse alandtse commented Jun 15, 2025

Summary by CodeRabbit

  • Chores
    • Improved the reliability of the build workflow by enhancing file change detection and adding fallback mechanisms to ensure builds proceed even if change detection fails.
    • Updated authentication for repository checkout and ensured correct commit references are fetched during workflow runs.

Copilot AI review requested due to automatic review settings June 15, 2025 11:08
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 15, 2025

Walkthrough

The .github/workflows/build.yaml workflow was updated to improve the reliability of the check-changes job. Enhancements include more robust detection of file changes, explicit fetching of PR refs, improved error handling, and fallback logic to ensure builds proceed even if change detection fails.

Changes

File(s) Change Summary
.github/workflows/build.yaml Enhanced check-changes job: improved file change detection, added error handling and fallback, updated checkout with token, and ensured PR refs are fetched for comparison.

Sequence Diagram(s)

sequenceDiagram
    participant GitHub Actions
    participant check-changes job
    participant changed-files step
    participant fallback step
    participant build job

    GitHub Actions->>check-changes job: Start workflow
    check-changes job->>changed-files step: Detect changed files (continue-on-error)
    alt changed-files step succeeds
        changed-files step->>check-changes job: Set outputs (should-build/hlsl-should-build)
    else changed-files step fails
        fallback step->>check-changes job: Set outputs to true (force build)
    end
    check-changes job->>build job: Pass outputs (should-build/hlsl-should-build)
    build job->>GitHub Actions: Run build if outputs are true
Loading

Possibly related PRs

Suggested reviewers

  • doodlum

Poem

In the warren of workflows, a change hops along,
With checks now more clever, and errors less strong.
If files can't be found or the steps go astray,
The build still continues—no work lost today!
So here’s to robustness, with carrots and cheer,
Our YAML grows smarter, year after year! 🥕


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a fallback mechanism for tj-actions/changed-files in the CI workflow to ensure builds are triggered even if file-change detection fails.

  • Updates the build outputs conditions to include a failure check on the changed-files step
  • Adds a step to fetch PR head and base commits
  • Implements a fallback step to set outputs to true when the changed-files step fails
Comments suppressed due to low confidence (3)

.github/workflows/build.yaml:39

  • Ensure that including 'steps.changed-files.conclusion == 'failure'' in the output condition aligns with the intended behavior for triggering builds when file-change detection fails, and consider adding a comment to clarify this fallback logic.
should-build: ${{ steps.changed-files.outputs.build_any_changed == 'true' || steps.changed-files.outputs.cpp_any_changed == 'true' || steps.changed-files.conclusion == 'failure' }}

.github/workflows/build.yaml:82

  • Consider adding inline comments explaining the rationale behind the fallback step to help maintainers understand its purpose in the CI pipeline.
- name: Fallback - Set outputs if changed-files failed

.github/workflows/build.yaml:55

  • Adding a brief comment here to explain that 'continue-on-error: true' is used intentionally to allow the fallback mechanism to trigger in case of failure would improve clarity.
continue-on-error: true

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/workflows/build.yaml (1)

82-87: Fallback step enforces build on detection failure
This fallback sets both outputs to true whenever change detection fails, guaranteeing downstream jobs run.

Consider scoping the fallback more narrowly by using if: steps.changed-files.conclusion == 'failure' instead of the generic failure() guard.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 36328d7 and 7db7ef3.

📒 Files selected for processing (1)
  • .github/workflows/build.yaml (2 hunks)
🔇 Additional comments (4)
.github/workflows/build.yaml (4)

39-40: Include failure of change detection as build trigger
Extending should-build and hlsl-should-build to fire when steps.changed-files.conclusion == 'failure' ensures the build proceeds even if the change detector errors out.


45-45: Provide token for authenticated checkout
Explicitly supplying ${{ secrets.GITHUB_TOKEN }} guarantees proper access to PR refs during checkout.


47-51: Fetch PR head and base refs explicitly
This step ensures both the PR head and base commits are available for diffing, eliminating reliance on implicit fetch behavior.


55-55: Continue-on-error for change detection
Allowing the changed-files step to continue on error prevents the entire job from failing if file-change detection encounters an issue.

@doodlum doodlum merged commit 3d93b03 into community-shaders:dev Jun 15, 2025
6 checks passed
davo0411 pushed a commit to davo0411/skyrim-community-shaders that referenced this pull request Jun 21, 2025
alandtse added a commit to alandtse/open-shaders that referenced this pull request Jul 20, 2025
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