Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(OLS): Adds aupport for OLS 1.8 #159

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 52 additions & 23 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- main

env:
OLS_VERSION: '1.7.19'
OLS_STABLE_VERSION: '1.8.0'
PHP_STABLE_VERSION: '8.3.4'
NODE_STABLE_VERSION: '20'
REGISTRY: ghcr.io
Expand All @@ -27,6 +27,9 @@ jobs:
- '16'
- '18'
- '20'
OLS_VERSION:
- '1.7.19'
- '1.8.0'

steps:
- name: Checkout
Expand All @@ -51,8 +54,8 @@ jobs:
- name: Determine OLS Major/Minor Version
id: ols-version
run: |
_0=$(echo ${{ env.OLS_VERSION }} | cut -d. -f1)
_1=$(echo ${{ env.OLS_VERSION }} | cut -d. -f2)
_0=$(echo ${{ matrix.OLS_VERSION }} | cut -d. -f1)
_1=$(echo ${{ matrix.OLS_VERSION }} | cut -d. -f2)
echo "_0=$_0" >> $GITHUB_OUTPUT
echo "_1=$_1" >> $GITHUB_OUTPUT

Expand All @@ -66,50 +69,74 @@ jobs:
echo "_1=$_1" >> $GITHUB_OUTPUT

# https://github.com/marketplace/actions/build-and-push-docker-images
- name: Build and Push Docker Image
- name: Build and Push Docker Image - non-latest OLS, non-latest Node, all PHP
uses: docker/build-push-action@v5
if: |
matrix.PHP_VERSION != env.PHP_STABLE_VERSION
matrix.OLS_VERSION != env.OLS_STABLE_VERSION
&& matrix.NODE_VERSION != env.NODE_STABLE_VERSION
with:
context: template
platforms: linux/arm64
provenance: false
build-args: |
OLS_VERSION=${{ env.OLS_VERSION }}
OLS_VERSION=${{ matrix.OLS_VERSION }}
PHP_VERSION=${{ matrix.PHP_VERSION }}
PHP_MAJOR_VERSION=${{ steps.php-version.outputs._0 }}
PHP_MINOR_VERSION=${{ steps.php-version.outputs._1 }}
NODE_VERSION=${{ matrix.NODE_VERSION }}
push: true
tags: |
${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ env.OLS_VERSION }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ matrix.OLS_VERSION }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ steps.ols-version.outputs._0 }}.${{ steps.ols-version.outputs._1 }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ steps.ols-version.outputs._0 }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
${{ env.REGISTRY }}/ndigitals/openlitespeed:lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
no-cache: ${{ github.event_name == 'workflow_dispatch' && true || false }}
cache-from: type=registry,ref=${{ env.REGISTRY }}/ndigitals/openlitespeed
cache-to: type=inline

# https://github.com/marketplace/actions/build-and-push-docker-images
- name: Build and Push Docker Image - latest PHP, non-latest Node
- name: Build and Push Docker Image - non-latest OLS, all PHP, latest Node
uses: docker/build-push-action@v5
if: |
matrix.OLS_VERSION != env.OLS_STABLE_VERSION
&& matrix.NODE_VERSION == env.NODE_STABLE_VERSION
with:
context: template
platforms: linux/arm64
provenance: false
build-args: |
OLS_VERSION=${{ matrix.OLS_VERSION }}
PHP_VERSION=${{ matrix.PHP_VERSION }}
PHP_MAJOR_VERSION=${{ steps.php-version.outputs._0 }}
PHP_MINOR_VERSION=${{ steps.php-version.outputs._1 }}
NODE_VERSION=${{ matrix.NODE_VERSION }}
push: true
tags: |
${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ matrix.OLS_VERSION }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ matrix.OLS_VERSION }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}
${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ steps.ols-version.outputs._0 }}.${{ steps.ols-version.outputs._1 }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ steps.ols-version.outputs._0 }}.${{ steps.ols-version.outputs._1 }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}
no-cache: ${{ github.event_name == 'workflow_dispatch' && true || false }}
cache-from: type=registry,ref=${{ env.REGISTRY }}/ndigitals/openlitespeed
cache-to: type=inline

# https://github.com/marketplace/actions/build-and-push-docker-images
- name: Build and Push Docker Image - latest OLS, all PHP, non-latest Node
uses: docker/build-push-action@v5
if: |
matrix.PHP_VERSION == env.PHP_STABLE_VERSION
matrix.OLS_VERSION == env.OLS_STABLE_VERSION
&& matrix.NODE_VERSION != env.NODE_STABLE_VERSION
with:
context: template
platforms: linux/arm64
provenance: false
build-args: |
OLS_VERSION=${{ env.OLS_VERSION }}
OLS_VERSION=${{ matrix.OLS_VERSION }}
PHP_VERSION=${{ matrix.PHP_VERSION }}
PHP_MAJOR_VERSION=${{ steps.php-version.outputs._0 }}
PHP_MINOR_VERSION=${{ steps.php-version.outputs._1 }}
NODE_VERSION=${{ matrix.NODE_VERSION }}
push: true
tags: |
${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ env.OLS_VERSION }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ matrix.OLS_VERSION }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ steps.ols-version.outputs._0 }}.${{ steps.ols-version.outputs._1 }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ steps.ols-version.outputs._0 }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
${{ env.REGISTRY }}/ndigitals/openlitespeed:lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
Expand All @@ -118,25 +145,26 @@ jobs:
cache-to: type=inline

# https://github.com/marketplace/actions/build-and-push-docker-images
- name: Build and Push Docker Image - latest Node, non-latest PHP
- name: Build and Push Docker Image - latest OLS, latest Node, non-latest PHP
uses: docker/build-push-action@v5
if: |
matrix.PHP_VERSION != env.PHP_STABLE_VERSION
matrix.OLS_VERSION == env.OLS_STABLE_VERSION
&& matrix.NODE_VERSION == env.NODE_STABLE_VERSION
&& matrix.PHP_VERSION != env.PHP_STABLE_VERSION
with:
context: template
platforms: linux/arm64
provenance: false
build-args: |
OLS_VERSION=${{ env.OLS_VERSION }}
OLS_VERSION=${{ matrix.OLS_VERSION }}
PHP_VERSION=${{ matrix.PHP_VERSION }}
PHP_MAJOR_VERSION=${{ steps.php-version.outputs._0 }}
PHP_MINOR_VERSION=${{ steps.php-version.outputs._1 }}
NODE_VERSION=${{ matrix.NODE_VERSION }}
push: true
tags: |
${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ env.OLS_VERSION }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ env.OLS_VERSION }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}
${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ matrix.OLS_VERSION }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ matrix.OLS_VERSION }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}
${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ steps.ols-version.outputs._0 }}.${{ steps.ols-version.outputs._1 }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ steps.ols-version.outputs._0 }}.${{ steps.ols-version.outputs._1 }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}
${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ steps.ols-version.outputs._0 }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
Expand All @@ -148,25 +176,26 @@ jobs:
cache-to: type=inline

# https://github.com/marketplace/actions/build-and-push-docker-images
- name: Build and Push Docker Image - latest PHP & Node
- name: Build and Push Docker Image - latest OLS, PHP & Node
uses: docker/build-push-action@v5
if: |
matrix.PHP_VERSION == env.PHP_STABLE_VERSION
matrix.OLS_VERSION == env.OLS_STABLE_VERSION
&& matrix.PHP_VERSION == env.PHP_STABLE_VERSION
&& matrix.NODE_VERSION == env.NODE_STABLE_VERSION
with:
context: template
platforms: linux/arm64
provenance: false
build-args: |
OLS_VERSION=${{ env.OLS_VERSION }}
OLS_VERSION=${{ matrix.OLS_VERSION }}
PHP_VERSION=${{ matrix.PHP_VERSION }}
PHP_MAJOR_VERSION=${{ steps.php-version.outputs._0 }}
PHP_MINOR_VERSION=${{ steps.php-version.outputs._1 }}
NODE_VERSION=${{ matrix.NODE_VERSION }}
push: true
tags: |
${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ env.OLS_VERSION }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ env.OLS_VERSION }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}
${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ matrix.OLS_VERSION }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ matrix.OLS_VERSION }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}
${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ steps.ols-version.outputs._0 }}.${{ steps.ols-version.outputs._1 }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ steps.ols-version.outputs._0 }}.${{ steps.ols-version.outputs._1 }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}
${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ steps.ols-version.outputs._0 }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ on:
- develop

env:
OLS_VERSION: '1.7.19'
PHP_STABLE_VERSION: '8.3.4'
NODE_STABLE_VERSION: '20'
REGISTRY: ghcr.io

jobs:
Expand All @@ -25,6 +22,9 @@ jobs:
NODE_VERSION:
- '18'
- '20'
OLS_VERSION:
- '1.7.19'
- '1.8.0'

steps:
- name: Checkout
Expand Down Expand Up @@ -62,21 +62,21 @@ jobs:
platforms: linux/arm64
provenance: false
build-args: |
OLS_VERSION=${{ env.OLS_VERSION }}
OLS_VERSION=${{ matrix.OLS_VERSION }}
PHP_VERSION=${{ matrix.PHP_VERSION }}
PHP_MAJOR_VERSION=${{ steps.php-version.outputs._0 }}
PHP_MINOR_VERSION=${{ steps.php-version.outputs._1 }}
NODE_VERSION=${{ matrix.NODE_VERSION }}
load: true
push: false
tags: openlitespeed:${{ env.OLS_VERSION }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
tags: openlitespeed:${{ matrix.OLS_VERSION }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
no-cache: ${{ github.event_name == 'workflow_dispatch' && true || false }}
cache-from: type=registry,ref=${{ env.REGISTRY }}/ndigitals/openlitespeed
cache-to: type=inline

- name: Test Docker Image
run: |
IMAGE=openlitespeed:${{ env.OLS_VERSION }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
IMAGE=openlitespeed:${{ matrix.OLS_VERSION }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}-node${{ matrix.NODE_VERSION }}
ID=$(docker run -d ${IMAGE})
sleep 5s
docker exec -i ${ID} su -c 'mkdir -p /var/www/vhosts/localhost/html/ && echo "<?php phpinfo();" > /var/www/vhosts/localhost/html/index.php && service lsws restart'
Expand Down
2 changes: 1 addition & 1 deletion template/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ARG PHP_MAJOR_VERSION
ARG PHP_MINOR_VERSION
ARG NODE_VERSION

FROM litespeedtech/openlitespeed:${OLS_VERSION}-lsphp${PHP_MAJOR_VERSION}0 AS ols
FROM litespeedtech/openlitespeed:1.7.19-lsphp${PHP_MAJOR_VERSION}0 AS ols

FROM debian:11-slim

Expand Down
Loading