Skip to content

Commit 4700300

Browse files
committed
Fix workflow
1 parent 5269af8 commit 4700300

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Cache PHP
2-
on:
2+
on:
33
- push
44
- repository_dispatch
55
jobs:
@@ -13,17 +13,21 @@ jobs:
1313
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@v2
17+
18+
- name: Add PPA
19+
run: |
20+
LC_ALL=C.UTF-8 sudo apt-add-repository ppa:ondrej/php -y
21+
sudo DEBIAN_FRONTEND=noninteractive apt-get update
1722
1823
- name: Clean PHP
1924
run: |
25+
sudo apt-get purge 'php*'
2026
sudo rm -rf /var/cache/apt/archives/*
21-
sudo apt-get remove php*
2227
2328
- name: Restore PHP
24-
run: |
25-
curl -o /tmp/php.sh -sSL https://raw.githubusercontent.com/actions/virtual-environments/master/images/linux/scripts/installers/php.sh
26-
sudo bash /tmp/php.sh || true
29+
run: curl -o /tmp/php.sh -sSL https://raw.githubusercontent.com/actions/virtual-environments/master/images/linux/scripts/installers/php.sh | sudo bash || true
30+
2731
- name: Setup PHP
2832
uses: shivammathur/setup-php@develop
2933
with:

0 commit comments

Comments
 (0)