Skip to content

Commit

Permalink
Merge pull request #138 from ndigitals/develop
Browse files Browse the repository at this point in the history
fix(PHP): Updates PHP versions to latest 2023-12-21 releases (#137)
  • Loading branch information
timnolte authored Dec 24, 2023
2 parents e9170cc + be5214d commit a2aa229
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 11 deletions.
26 changes: 18 additions & 8 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

env:
OLS_VERSION: 1.7.18
PHP_STABLE_VERSION: '8.3.0'
PHP_STABLE_VERSION: '8.3.1'
REGISTRY: ghcr.io

jobs:
Expand All @@ -17,7 +17,11 @@ jobs:
strategy:
fail-fast: false
matrix:
PHP_VERSION: ['8.0.30','8.1.26','8.2.13','8.3.0']
PHP_VERSION:
- '8.0.30'
- '8.1.27'
- '8.2.14'
- '8.3.1'

steps:
- name: Checkout
Expand Down Expand Up @@ -76,7 +80,7 @@ jobs:
${{ env.REGISTRY }}/ndigitals/openlitespeed:${{ steps.ols-version.outputs._0 }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}
${{ env.REGISTRY }}/ndigitals/openlitespeed: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:latest
cache-from: type=registry,ref=${{ env.REGISTRY }}/ndigitals/openlitespeed
cache-to: type=inline

# https://github.com/marketplace/actions/build-and-push-docker-images
Expand All @@ -100,21 +104,27 @@ jobs:
${{ env.REGISTRY }}/ndigitals/openlitespeed:lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}
${{ env.REGISTRY }}/ndigitals/openlitespeed:latest
no-cache: ${{ github.event_name == 'workflow_dispatch' && true || false }}
cache-from: type=registry,ref=${{ env.REGISTRY }}/ndigitals/openlitespeed:latest
cache-from: type=registry,ref=${{ env.REGISTRY }}/ndigitals/openlitespeed
cache-to: type=inline

release:
name: Publish Release
runs-on: ubuntu-latest
needs: buildx

steps:
# https://github.com/marketplace/actions/semver-conventional-commits
- name: Get Versions
id: semver
uses: ietf-tools/semver-action@v1
if: matrix.PHP_VERSION == env.PHP_STABLE_VERSION && github.event_name == 'push'
if: github.event_name == 'push'
with:
token: ${{ github.token }}
branch: main

- name: Create Release Name
id: release-name
if: matrix.PHP_VERSION == env.PHP_STABLE_VERSION && github.event_name == 'push'
if: github.event_name == 'push'
run: |
RELEASE_NAME=$(echo ${{ steps.semver.outputs.nextStrict }} Release)
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_OUTPUT
Expand All @@ -123,7 +133,7 @@ jobs:
- name: Generate a Changelog
id: changelog
uses: mrchief/[email protected]
if: matrix.PHP_VERSION == env.PHP_STABLE_VERSION && github.event_name == 'push'
if: github.event_name == 'push'
with:
previousReleaseTagNameOrSha: ${{ steps.semver.outputs.current }}
nextReleaseTagName: 'main'
Expand All @@ -132,7 +142,7 @@ jobs:
# https://github.com/marketplace/actions/create-release
- name: Create Release
uses: ncipollo/[email protected]
if: matrix.PHP_VERSION == env.PHP_STABLE_VERSION && github.event_name == 'push'
if: github.event_name == 'push'
with:
name: ${{ steps.release-name.outputs.RELEASE_NAME }}
tag: ${{ steps.semver.outputs.next }}
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/test-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

env:
OLS_VERSION: 1.7.18
PHP_STABLE_VERSION: '8.3.0'
PHP_STABLE_VERSION: '8.3.1'
REGISTRY: ghcr.io

jobs:
Expand All @@ -17,7 +17,11 @@ jobs:
strategy:
fail-fast: false
matrix:
PHP_VERSION: ['8.0.30','8.1.26','8.2.13','8.3.0']
PHP_VERSION:
- '8.0.30'
- '8.1.27'
- '8.2.14'
- '8.3.1'

steps:
- name: Checkout
Expand Down Expand Up @@ -63,7 +67,7 @@ jobs:
push: false
tags: openlitespeed:${{ env.OLS_VERSION }}-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:${{ env.OLS_VERSION }}-lsphp${{ steps.php-version.outputs._0 }}${{ steps.php-version.outputs._1 }}
cache-from: type=registry,ref=${{ env.REGISTRY }}/ndigitals/openlitespeed
cache-to: type=inline

- name: Test Docker Image
Expand Down

0 comments on commit a2aa229

Please sign in to comment.