fix(ci): Fix bootstrap script and sudo helper for GitHub Actions#16
Merged
ralflang merged 4 commits intoFRAMEWORK_6_0from Mar 3, 2026
Merged
fix(ci): Fix bootstrap script and sudo helper for GitHub Actions#16ralflang merged 4 commits intoFRAMEWORK_6_0from
ralflang merged 4 commits intoFRAMEWORK_6_0from
Conversation
…p script
The bootstrap template was hardcoding the PHAR URL instead of
respecting the environment variable passed from the workflow.
Changed line 14 from:
COMPONENTS_PHAR_URL="{{COMPONENTS_PHAR_URL}}"
To:
COMPONENTS_PHAR_URL="${COMPONENTS_PHAR_URL:-{{COMPONENTS_PHAR_URL}}}"
This allows the workflow to pass the organization variable value
while maintaining a fallback default.
Without this fix, the org variable COMPONENTS_PHAR_URL is ignored
and the hardcoded default is always used.
The horde-components PHAR does not support --version flag (it requires --version-part argument). This caused the bootstrap script to always fail when validating the downloaded PHAR. Changed validation from: php "$COMPONENTS_PHAR" --version &> /dev/null To: php "$COMPONENTS_PHAR" help &> /dev/null The help command works without arguments and validates that the PHAR is executable and functional. Also removed the redundant --version call after download that would also fail.
Add isRoot() method to detect if running as root (euid 0) and cache the result. When running as root, skip the 'sudo' prefix in all privileged commands. This fixes CI execution in GitHub Actions where the runner process runs as root and doesn't need sudo to execute privileged operations. Changes: - Add isRoot() static method with cached result - Update canRunPasswordless() to return true if root - Update addPpa() to skip sudo if root - Update installPhp() to skip sudo if root - Update installExtension() to skip sudo if root - Update isPhpInstalled() to skip sudo if root Without this fix, all sudo commands fail in GitHub Actions because the helper script is called with sudo when already running as root.
ralflang
added a commit
that referenced
this pull request
Mar 3, 2026
Release version 1.0.0-alpha28 (API Version: 1.0.0-alpha1) fix(ci): Fix bootstrap script and sudo helper for GitHub Actions (#16)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix multiple issues discovered during Phase 3 CI deployment testing on horde/Http.
Issues Fixed
1. Environment Variable Not Respected (6452f8a9)
Bootstrap script hardcoded PHAR URL instead of respecting environment variable from workflow.
Changed:
COMPONENTS_PHAR_URL="{{COMPONENTS_PHAR_URL}}"To:
COMPONENTS_PHAR_URL="${COMPONENTS_PHAR_URL:-{{COMPONENTS_PHAR_URL}}}"Now prefers environment variable while maintaining fallback default.
2. Invalid PHAR Validation Command (989ccc6)
Bootstrap script used
--versionflag which doesn't exist in horde-components.Changed:
php "$COMPONENTS_PHAR" --versionTo:
php "$COMPONENTS_PHAR" helpThe
helpcommand works without arguments and validates PHAR functionality.3. Wrong Option Name (51fbf11)
Bootstrap script used
--mode=githubbut command expects--ci-mode=github.Changed:
--mode=githubTo:
--ci-mode=github4. Sudo When Running as Root (e22316f)
SudoHelper always prefixed commands with
sudoeven when already running as root (GitHub Actions).Added:
isRoot()method to detect root user (euid 0)sudoprefix in all methods when running as rootMethods updated:
Testing
Tested on horde/Http PR #2:
Impact
Critical fixes for GitHub Actions CI execution. Without these changes:
Next Steps
After merge: