Feat: Add path_prefix output for downstream actions#139
Feat: Add path_prefix output for downstream actions#139tykeal merged 4 commits intolfreleng-actions:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a path_prefix output to the python-build-action to facilitate passing the path prefix value to downstream actions when building Python projects in subdirectories. This addresses issue #138 by allowing workflows to reference needs.python-build.outputs.path_prefix instead of having to manually duplicate the value.
Changes:
- Added
path_prefixoutput to action.yaml that exposes the input value - Updated outputs documentation table in README.md
- Added comprehensive usage example showing how to pass path_prefix between jobs
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| action.yaml | Adds new path_prefix output that exposes the input value for downstream consumption |
| README.md | Documents the new output in the outputs table and provides a complete multi-job workflow example demonstrating its usage |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5d6b6bf to
35be640
Compare
When using path_prefix to build projects in subdirectories, downstream actions like python-test-action, python-audit-action, and python-sbom-action also need the same path_prefix value. This change outputs path_prefix so workflows can pass it to later jobs via needs.python-build.outputs.path_prefix. Fixes: lfreleng-actions#138 Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
35be640 to
75f9c9c
Compare
Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
These appear to have been accidentally committed after a debugging sessions. Mostly they added nothing, since the overlap with some GitHub defaults, and were added to steps containing no pipe symbols. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
5bf580e to
37d0ec1
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
action.yaml:284
- Removal of
set -euo pipefailmeans pip install commands could fail silently without stopping the script. This could lead to builds proceeding with missing dependencies, which would cause failures later in the process. If the removal is intentional, explicit error handling should be added for all critical commands.
# Install build dependencies
echo 'Installing Python build dependencies...'
python -m pip install --disable-pip-version-check \
-q --upgrade build packaging
echo 'Build dependencies installed ✅'
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
When using path_prefix to build projects in subdirectories, downstream actions like python-test-action, python-audit-action, and python-sbom-action also need the same path_prefix value. This change outputs path_prefix so others can consume it with needs.python-build.outputs.path_prefix.
Also, mandatory tests were failing on this PR which required additional updates.
Spurious code was previously committed containing shell set commands in various steps. These were mistakenly placed above comments, and often enabled
pipefailin steps that did not contain any pipes, also adding options that overlapped with the GitHub default behaviours. Removing these lines cleans up mostly useless/boilerplate code.