Skip to content

Feat: Add path_prefix output for downstream actions#139

Merged
tykeal merged 4 commits intolfreleng-actions:mainfrom
modeseven-lfreleng-actions:update-action
Feb 5, 2026
Merged

Feat: Add path_prefix output for downstream actions#139
tykeal merged 4 commits intolfreleng-actions:mainfrom
modeseven-lfreleng-actions:update-action

Conversation

@ModeSevenIndustrialSolutions
Copy link
Contributor

@ModeSevenIndustrialSolutions ModeSevenIndustrialSolutions commented Feb 5, 2026

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.

  • Make Git unshallow step conditional (this was causing some tox builds to fail)

Spurious code was previously committed containing shell set commands in various steps. These were mistakenly placed above comments, and often enabled pipefail in 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.

Copy link

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 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_prefix output 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.

@ModeSevenIndustrialSolutions ModeSevenIndustrialSolutions marked this pull request as draft February 5, 2026 06:29
@ModeSevenIndustrialSolutions
Copy link
Contributor Author

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>

This comment was marked as outdated.

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>
Copy link

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

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 pipefail means 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>
@tykeal tykeal merged commit 8e55c26 into lfreleng-actions:main Feb 5, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants