Skip to content

Commit b7c7881

Browse files
Rever to ubuntu-20.04
1 parent 7ad4a65 commit b7c7881

File tree

1 file changed

+13
-50
lines changed

1 file changed

+13
-50
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
jobs:
88
setup-ubuntu:
9-
runs-on: ubuntu-latest
9+
runs-on: ubuntu-20.04
1010

1111
steps:
1212
- name: Check for GitHub API key
@@ -21,51 +21,15 @@ jobs:
2121
echo "GitHub API key found."
2222
fi
2323
24-
- name: Install PHP 8.0 and extensions
25-
run: |
26-
sudo apt-get update
27-
28-
# Core PHP 8.0 + CLI
29-
sudo apt-get install -y \
30-
php8.0 \
31-
php8.0-cli \
32-
php8.0-common
33-
34-
# Extensions
35-
sudo apt-get install -y \
36-
php8.0-bcmath \
37-
php8.0-bz2 \
38-
php8.0-curl \
39-
php8.0-gd \
40-
php8.0-intl \
41-
php8.0-mbstring \
42-
php8.0-mysql \
43-
php8.0-pgsql \
44-
php8.0-sqlite3 \
45-
php8.0-xml \
46-
php8.0-zip \
47-
php8.0-readline \
48-
php-redis \
49-
unzip \
50-
tzdata
51-
52-
# Register php8.0 as the default php
53-
if update-alternatives --query php >/dev/null 2>&1; then
54-
sudo update-alternatives --set php /usr/bin/php8.0
55-
else
56-
sudo update-alternatives --install /usr/bin/php php /usr/bin/php8.0 1
57-
fi
58-
59-
php -v
60-
php -m
61-
6224
- name: Updating Dependencies + zip
6325
run: |
6426
cd ~
6527
curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php
6628
HASH=`curl -sS https://composer.github.io/installer.sig`
6729
sudo php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer
6830
31+
sudo update-alternatives --set php /usr/bin/php8.0
32+
6933
cd /tmp
7034
mkdir linkstack
7135
cd linkstack
@@ -204,17 +168,16 @@ jobs:
204168
- name: Upload to Update Server
205169
if: ${{ github.event_name == 'push' }}
206170
run: |
207-
cd /tmp/linkstack
208-
ls
209-
TAG_VERSION="${GITHUB_REF##*/}"
210-
version=${TAG_VERSION#"v"}
171+
cd /tmp/linkstack
172+
ls
173+
TAG_VERSION="${GITHUB_REF##*/}"
174+
version=${TAG_VERSION#"v"}
211175
212-
# Install the OpenSSH client and sshpass
213-
sudo apt-get update
214-
sudo apt-get install -y openssh-client sshpass
176+
# Install the OpenSSH client
177+
sudo apt-get install -y openssh-client
215178
216-
# Clear the remote directory
217-
sshpass -p "${{ secrets.SERVER_PASSWORD }}" ssh -o StrictHostKeyChecking=no -p ${{ secrets.SERVER_PORT }} ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }} "rm -rf ${{ secrets.REMOTE_PATH }}/*"
179+
# Clear the remote directory
180+
sshpass -p "${{ secrets.SERVER_PASSWORD }}" ssh -o StrictHostKeyChecking=no -p ${{ secrets.SERVER_PORT }} ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }} "rm -rf ${{ secrets.REMOTE_PATH }}/*"
218181
219-
# Use SSH to upload the file to the remote server
220-
sshpass -p "${{ secrets.SERVER_PASSWORD }}" scp -o StrictHostKeyChecking=no -P ${{ secrets.SERVER_PORT }} $version.zip ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }}:${{ secrets.REMOTE_PATH }}
182+
# Use SSH to upload the file to the remote server
183+
sshpass -p "${{ secrets.SERVER_PASSWORD }}" scp -o StrictHostKeyChecking=no -P ${{ secrets.SERVER_PORT }} $version.zip ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }}:${{ secrets.REMOTE_PATH }}

0 commit comments

Comments
 (0)