Skip to content

ci(sync): update GitHub Actions - #96

Merged
alexpriv8 merged 1 commit into
masterfrom
ci/sync-github-actions-0012d30
Aug 5, 2026
Merged

ci(sync): update GitHub Actions#96
alexpriv8 merged 1 commit into
masterfrom
ci/sync-github-actions-0012d30

Conversation

@indykiteone

Copy link
Copy Markdown
Contributor

Automatically generated PR to sync GitHub Actions and related configs.

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings August 5, 2026 05:16
@indykiteone
indykiteone requested a review from a team August 5, 2026 05:16

Copilot AI left a comment

Copy link
Copy Markdown

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 syncs the shared pre-commit composite GitHub Action by extracting the environment-detection logic into a dedicated script and wiring the action to use the detected Python version.

Changes:

  • Added prepare-env.sh to detect repo characteristics (pre-commit presence, Terraform/Go/Node hooks, Node PM/lockfile, and Python version sources) and emit step outputs.
  • Updated the composite action to call prepare-env.sh and to pass the detected PYTHON_VERSION into actions/setup-python.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
.github/actions/pre-commit/prepare-env.sh New helper script to prepare action outputs (language/tool detection + Python version resolution).
.github/actions/pre-commit/action.yaml Switched env setup to the helper script and made setup-python use the detected Python version.
Suppressed comments (1)

.github/actions/pre-commit/prepare-env.sh:75

  • normalize_python_version uses grep | head under set -o pipefail. For specs that contain multiple numeric tokens (e.g. the documented ">=3.14.1,<1.15"), head will close the pipe early and grep can exit non-zero due to SIGPIPE, causing the whole script to exit because of errexit/pipefail. Use grep -m1 (and tolerate no-match) to avoid the SIGPIPE/pipefail failure mode.
normalize_python_version() {
    grep -oE '[0-9]+(\.[0-9]+){0,2}' <<<"${1}" | head -n1
}

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


set -o errexit -o nounset -o pipefail

: "${GITHUB_OUTPUT:=""}"
@alexpriv8
alexpriv8 merged commit 7580db3 into master Aug 5, 2026
8 checks passed
@alexpriv8
alexpriv8 deleted the ci/sync-github-actions-0012d30 branch August 5, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants