mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-03 23:05:41 +08:00
add micro php build
This commit is contained in:
17
.github/workflows/build-php.yml
vendored
17
.github/workflows/build-php.yml
vendored
@@ -30,10 +30,25 @@ jobs:
|
||||
fi
|
||||
- name: Build PHP ${{ matrix.php-versions }} for ${{ matrix.arch }}
|
||||
run: cd docker/ && docker build . --file Dockerfile --tag static-php --build-arg USE_BACKUP_ADDRESS=yes --build-arg COMPILE_PHP_VERSION=${{ matrix.php-versions }}
|
||||
- name: Build micro PHP distribution ${{ matrix.php-versions }} for ${{ matrix.arch }}
|
||||
run: |
|
||||
if [[ "${{ matrix.arch }}" = "x86_64" ]]; then
|
||||
MAIN_VERSION=$(echo "${{ matrix.php-versions }}" | awk -F. '{print $1}')
|
||||
if [[ "$MAIN_VERSION" = "8" ]]; then
|
||||
cd docker/ && docker build . --file Dockerfile --tag static-micro --build-arg USE_BACKUP_ADDRESS=yes --build-arg COMPILE_PHP_VERSION=${{ matrix.php-versions }} --build-arg COMPILE_MICRO=yes
|
||||
fi
|
||||
fi
|
||||
- name: Push PHP ${{ matrix.php-versions }} to dist
|
||||
run: |
|
||||
mkdir dist && docker run --rm -v $(pwd)/dist:/dist/ static-php cp php-dist/bin/php /dist/
|
||||
cd dist && tar -zcvf "php-${{ matrix.php-versions }}-static-bin-${{ matrix.arch }}.tar.gz" ./php && rm ./php
|
||||
cd dist && tar -zcvf "php-${{ matrix.php-versions }}-static-bin-${{ matrix.arch }}.tar.gz" ./php && rm ./php && cd ..
|
||||
if [[ "${{ matrix.arch }}" = "x86_64" ]]; then
|
||||
MAIN_VERSION=$(echo "${{ matrix.php-versions }}" | awk -F. '{print $1}')
|
||||
if [[ "$MAIN_VERSION" = "8" ]]; then
|
||||
docker run --rm -v $(pwd)/dist:/dist static-micro cp /app/source/php-"${{ matrix.php-versions }}"/sapi/micro/micro.sfx /dist/
|
||||
cd dist && tar -zcvf "micro-${{ matrix.php-versions }}-${{ matrix.arch }}.tar.gz" ./micro.sfx && rm ./micro.sfx && cd ..
|
||||
fi
|
||||
fi
|
||||
- name: Deploy to Zhamao Server
|
||||
uses: easingthemes/ssh-deploy@main
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user