Skip to content

Litespeed 8

Litespeed 8 #25

Workflow file for this run

name: "Litespeed 8"
on:
workflow_dispatch:
schedule:
- cron: '35 21 * * 2'
env:
# The default repo env will be 'ComputeStacks'; uppercase is not allowed.
GH_REPO: computestacks/cs-docker-php
jobs:
build:
strategy:
matrix:
include:
- php_version: "8.1"
lsphp_version: "81"
image: "ghcr.io/computestacks/cs-docker-php"
- php_version: "8.2"
lsphp_version: "82"
image: "ghcr.io/computestacks/cs-docker-php"
- php_version: "8.1"
lsphp_version: "81"
image: "cmptstks/php"
- php_version: "8.2"
lsphp_version: "82"
image: "cmptstks/php"
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log into Github Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Log into DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ matrix.image }}
tags: |
${{ matrix.php_version }}-litespeed
- name: Build and prepare to test
uses: docker/build-push-action@v5
with:
context: litespeed/8/
load: true
build-args: |
php_version=${{ matrix.php_version }}
lsphp_version=${{ matrix.lsphp_version }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Test container image
run: >
docker run --name=testphp${{ matrix.php_version }} -d \
-e CS_AUTH_KEY=FcUpBTaoi746JbAdhWqJwtmXC0en1M3u -e METADATA_SERVICE=http://localhost \
-e METADATA_AUTH=foobar123 -e LS_ADMIN_PW=ch3ngm3 ${{ matrix.image }}:${{ matrix.php_version }}-litespeed
bash ./scripts/container-health.sh testphp${{ matrix.php_version }}
- name: Build and push
id: build-and-push
uses: docker/build-push-action@v5
with:
context: litespeed/8/
push: ${{ github.event_name != 'pull_request' }}
build-args: |
php_version=${{ matrix.php_version }}
lsphp_version=${{ matrix.lsphp_version }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max