Skip to content

Consolidate hashFiles() calls in the build.yml workflow#269

Open
mcdonnnj wants to merge 1 commit into
developfrom
improvement/consolidate_file_hashes_in_gha
Open

Consolidate hashFiles() calls in the build.yml workflow#269
mcdonnnj wants to merge 1 commit into
developfrom
improvement/consolidate_file_hashes_in_gha

Conversation

@mcdonnnj

@mcdonnnj mcdonnnj commented May 4, 2026

Copy link
Copy Markdown
Member

🗣 Description

This pull request updates the cache key we use in the build.yml workflow to use a single call to hashFiles() with all files instead of individual calls per file.

💭 Motivation and context

This generate a single derived hash from the files which will reduce the length of the cache key used. This is mostly just to ease interaction with the gh cache extension and when inspecting the log for a workflow run.

🧪 Testing

Automated tests pass.

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All new and existing tests pass.

This will generate a single hash from all files listed.
@mcdonnnj mcdonnnj requested a review from Copilot May 4, 2026 06:21
@mcdonnnj mcdonnnj self-assigned this May 4, 2026
@mcdonnnj mcdonnnj requested review from dav3r, felddy and jsf9k as code owners May 4, 2026 06:21
@mcdonnnj mcdonnnj added the improvement This issue or pull request will add or improve functionality, maintainability, or ease of use label May 4, 2026
@github-actions github-actions Bot added the github-actions Pull requests that update GitHub Actions code label May 4, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 streamlines the GitHub Actions cache key used in .github/workflows/build.yml by consolidating multiple hashFiles() invocations into a single call that hashes all relevant dependency/config files together, reducing cache key length for easier inspection and interaction with tooling like gh cache.

Changes:

  • Replace three separate hashFiles() calls with a single hashFiles(pattern1, pattern2, pattern3) call.
  • Shorten/simplify the resulting cache key while keeping it sensitive to the same set of input files.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-project-automation github-project-automation Bot moved this from In progress to Reviewer approved in Skeleton Maintenance May 4, 2026
@mcdonnnj mcdonnnj added the kraken 🐙 This pull request is ready to merge during the next Lineage Kraken release label May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github-actions Pull requests that update GitHub Actions code improvement This issue or pull request will add or improve functionality, maintainability, or ease of use kraken 🐙 This pull request is ready to merge during the next Lineage Kraken release

Projects

Status: Reviewer approved

Development

Successfully merging this pull request may close these issues.

4 participants