Skip to content

allow a list of files for repositoryCacheConfig#117

Merged
p0deje merged 2 commits intobazel-contrib:mainfrom
kseth:main
Dec 16, 2025
Merged

allow a list of files for repositoryCacheConfig#117
p0deje merged 2 commits intobazel-contrib:mainfrom
kseth:main

Conversation

@kseth
Copy link
Contributor

@kseth kseth commented Dec 15, 2025

This PR allows a list of files via repositoryCacheConfig by usingyaml.parse to parse the config. This follows the pattern for externalCacheConfig.

I also updated README.md to have an appropriate example:

- uses: bazel-contrib/setup-bazel@0.15.0
  with:
    repository-cache: |
      - MODULE.bazel
      - requirements_locked.txt

Fixes #116

NOTE: This change is backwards incompatible in the multi-line case since previously, the action would look for a single-string file with newlines and markup, but now we parse it into distinct files. I think this is fine since that case was broken anyway.

core.saveState('google-credentials-path', googleCredentialsPath)
}

const externalCacheConfig = yaml.parse(core.getInput('external-cache'))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just moved this down here for consistency / legibility but happy to undo.

Copy link

@tjdharamsi tjdharamsi left a comment

Choose a reason for hiding this comment

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

thanks, looks good to me!

@kseth kseth requested a review from p0deje December 16, 2025 16:00
@p0deje p0deje merged commit 905421c into bazel-contrib:main Dec 16, 2025
3 checks passed
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.

Cannot pass in list of files for caching repository_cache

3 participants