Skip to content

Upgrade to PHP 8.4 #274

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

Open
wants to merge 4 commits into
base: dev
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
47 changes: 20 additions & 27 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
- LICENSE
- .github/workflows/update-dockerhub-desc.yml
- .github/workflows/test-pr.yml
#pull_request:
# branches: ["dev"]

env:
IMAGE_REGISTRY: ${{ vars.REGISTRY_PUBLIC }}
Expand All @@ -29,35 +31,22 @@
with:
fetch-depth: 0

- name: Prepare
id: prepare
run: |
DOCKER_PLATFORMS=${{ vars.CONTAINER_ARCH }}

VERSION=${GITHUB_REF#refs/*/}
TAGS="${{ env.IMAGE_NAME }}:${VERSION}"

if [[ $GITHUB_REF == refs/tags/* ]]; then
TAGS="$TAGS,${{ env.IMAGE_NAME }}:latest"
fi

for TAG in $(echo $TAGS | sed 's/,/ /g'); do
TAGS="$TAGS,quay.io/$TAG"
done

echo "platforms=${DOCKER_PLATFORMS}" >> $GITHUB_OUTPUT
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
- name: Prepare Meta Data
id: meta
uses: docker/metadata-action@v5

Check warning on line 36 in .github/workflows/build.yml

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

.github/workflows/build.yml#L36

An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release.
with:
images: |
${{ env.IMAGE_NAME }}
quay.io/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=tag
type=ref,event=branch

- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:latest
platforms: all

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
id: buildx

- name: Login to DockerHub
uses: docker/login-action@v3
Expand Down Expand Up @@ -89,12 +78,13 @@
env:
TRIVY_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-db,public.ecr.aws/aquasecurity/trivy-db

- name: Upload Trivy scan results to GitHub Security tab
- name: Upload Trivy scan results
if: github.event_name != 'pull_request'
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: 'trivy-results.sarif'

- name: Run the Anchore scan action
- name: Run Anchore scan
uses: anchore/scan-action@v6
id: anchore-scan
with:
Expand All @@ -103,6 +93,7 @@
fail-build: false

- name: Upload Anchore Scan Report
if: github.event_name != 'pull_request'
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ steps.anchore-scan.outputs.sarif }}
Expand Down Expand Up @@ -134,6 +125,8 @@
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.prepare.outputs.tags }}
platforms: ${{ steps.prepare.outputs.platforms }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}
platforms: ${{ vars.CONTAINER_ARCH }}
provenance: false
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ LABEL org.opencontainers.image.title="alpine-php-nginx" \
org.opencontainers.image.source="https://github.com/jimsihk/alpine-php-nginx" \
org.opencontainers.image.documentation="https://github.com/jimsihk/alpine-php-nginx"

ARG PHP_V=83
ARG PHP_V=84
ENV PHP_RUNTIME=php${PHP_V}
ENV PHP_FPM_RUNTIME=php-fpm${PHP_V}
# renovate: datasource=repology depName=alpine_3_21/php83 versioning=loose
ENV PHP_VERSION="=8.3.19-r0"
# renovate: datasource=repology depName=alpine_3_21/php83-pecl-apcu versioning=loose
ARG PHP_PECL_APCU_VERSION="=5.1.24-r0"
# renovate: datasource=repology depName=alpine_3_21/php83-pecl-memcached versioning=loose
# renovate: datasource=repology depName=alpine_3_21/php84 versioning=loose
ENV PHP_VERSION="=8.4.5-r0"
# renovate: datasource=repology depName=alpine_3_21/php84-pecl-apcu versioning=loose
ARG PHP_PECL_APCU_VERSION="=5.1.24-r1"
# renovate: datasource=repology depName=alpine_3_21/php84-pecl-memcached versioning=loose
ARG PHP_PECL_MEMCACHED_VERSION="=3.3.0-r0"
# renovate: datasource=repology depName=alpine_3_21/php83-pecl-redis versioning=loose
# renovate: datasource=repology depName=alpine_3_21/php84-pecl-redis versioning=loose
ARG PHP_PECL_REDIS_VERSION="=6.2.0-r0"
# renovate: datasource=repology depName=alpine_3_21/nginx versioning=loose
ARG NGINX_VERSION="=1.26.3-r0"
Expand Down
2 changes: 1 addition & 1 deletion run_tests.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/env sh
curl --silent --fail http://app:8080 | grep '8.3'
curl --silent --fail http://app:8080 | grep '8.4'