fix(ci): hard-code sister package clone instead of PHP parsing
Direct git clone of ../php-framework avoids shell escaping issues with dynamic PHP-based path extraction. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
da2cbd87a2
commit
b1541df187
1 changed files with 6 additions and 17 deletions
|
|
@ -26,26 +26,15 @@ jobs:
|
||||||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite
|
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite
|
||||||
coverage: pcov
|
coverage: pcov
|
||||||
|
|
||||||
- name: Checkout path dependencies
|
- name: Clone sister packages
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
shell: bash
|
|
||||||
run: |
|
run: |
|
||||||
php -r '
|
echo "Cloning php-framework into ../php-framework"
|
||||||
$d = json_decode(file_get_contents("composer.json"), true);
|
git clone --depth 1 \
|
||||||
foreach ($d["repositories"] ?? [] as $r) {
|
"https://x-access-token:${GITHUB_TOKEN}@forge.lthn.ai/core/php-framework.git" \
|
||||||
if (($r["type"] ?? "") === "path") echo $r["url"] . "\n";
|
../php-framework
|
||||||
}
|
ls -la ../php-framework/composer.json
|
||||||
' | while IFS= read -r path; do
|
|
||||||
[ -z "$path" ] && continue
|
|
||||||
dir_name=$(basename "$path")
|
|
||||||
if [ ! -d "$path" ]; then
|
|
||||||
echo "Cloning $dir_name into $path"
|
|
||||||
git clone --depth 1 \
|
|
||||||
"https://x-access-token:${GITHUB_TOKEN}@forge.lthn.ai/core/${dir_name}.git" \
|
|
||||||
"$path" || echo "Warning: Failed to clone $dir_name"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: composer install --prefer-dist --no-interaction --no-progress
|
run: composer install --prefer-dist --no-interaction --no-progress
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue