Skip to content

Litespeed 7

Litespeed 7 #18

Workflow file for this run

name: "Litespeed 7"
on:
workflow_dispatch:
schedule:
- cron: '35 22 * * 2'
env:
# The default repo env will be 'ComputeStacks'; uppercase is not allowed.
GH_REPO: computestacks/cs-docker-php
jobs:
build:
strategy:
matrix:
php_version: [ "7.4" ]
image: [ "ghcr.io/computestacks/cs-docker-php", "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/${{ matrix.php_version }}/
load: true
build-args: |
php_version=${{ matrix.php_version }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Test container image
run: >
docker run --name=testphp -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
- name: Build and push
id: build-and-push
uses: docker/build-push-action@v5
with:
context: litespeed/${{ matrix.php_version }}/
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max