Skip to content

Commit 7f23de8

Browse files
committed
Fix patch in php.sh
Add workflow_dispatch event in build.yaml Install zstd using brew
1 parent dd93d9b commit 7f23de8

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Cache PHP
22
on:
33
- push
44
- repository_dispatch
5+
- workflow_dispatch
56
jobs:
67
build:
78
runs-on: ${{ matrix.operating-system }}
@@ -41,7 +42,10 @@ jobs:
4142
for i in $versions; do
4243
if [ "$i" = "$version" ]; then
4344
curl -o /tmp/php.sh -sSL https://raw.githubusercontent.com/actions/virtual-environments/main/images/linux/scripts/installers/php.sh
44-
sed -i "s/\$php_versions/${{ matrix.php-versions }}/g" /tmp/php.sh
45+
sed -i "s/\$(jq -r '.php.versions\[\]' \$toolset)/\"$version\"/" /tmp/php.sh
46+
sed -i 's/php-/php$version-/' /tmp/php.sh
47+
sed -i 's/php$version-pear/php-pear/' /tmp/php.sh
48+
grep 'php_versions=' /tmp/php.sh
4549
sudo bash /tmp/php.sh || true
4650
fi
4751
done
@@ -80,12 +84,9 @@ jobs:
8084
\"public_stats\": true \
8185
}" \
8286
https://api.bintray.com/packages/"$BINTRAY_USER"/"$BINTRAY_REPO" || true
83-
curl -sSLO http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-10/gcc-10-base_10-20200411-0ubuntu1_amd64.deb
84-
curl -sSLO http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-10/libgcc-s1_10-20200411-0ubuntu1_amd64.deb
85-
curl -sSLO http://archive.ubuntu.com/ubuntu/pool/universe/libz/libzstd/zstd_1.4.4+dfsg-3_amd64.deb
86-
sudo DEBIAN_FRONTEND=noninteractive dpkg -i --force-conflicts ./*.deb
87-
sudo rm -rf ./*.deb
88-
zstd -V
87+
export PATH="$HOME/.linuxbrew/bin:$PATH"
88+
echo "export PATH=$HOME/.linuxbrew/bin:\$PATH" >> "$GITHUB_ENV"
89+
brew install zstd >/dev/null 2>&1 && zstd -V
8990
mkdir "$VERSION" && sudo mv /var/cache/apt/archives/*.deb ./"$VERSION"/
9091
if [ -e ./"$VERSION"/php"$VERSION"-cli* ]; then
9192
sudo tar cf - "$VERSION" | zstd -22 -T0 --ultra > php_"$VERSION"+ubuntu"$DISTRIB_RELEASE".tar.zst

0 commit comments

Comments
 (0)