This GitHub action applies to pull requests and populates an output variable with the set of Bazel targets that have changed (including dependencies), based on the set of files that have been changed.
It needs to be executed after the actions/checkout action, as it needs to operate on the repository.
- name: Changed Files Exporter
uses: umani/modified-bazel-targets@v2
with:
changed_files: "file1.go path/to/file2.go"
changed_files
: The set of changed files as a whitespace separated list.bazel_exec
: How to invoke the Bazel command; defaults tobazel
.
bazel_targets
: A whitespace separated list of the affected Bazel targets.
To release a new version of this action, do:
yarn build && yarn run pack
git add dist
git commit -a -m "release: {version}"
git push origin releases/{version}