Skip to content

Commit

Permalink
Add PHP 8.4 support (#46)
Browse files Browse the repository at this point in the history
* Add php 8.4 support

* Update PHP version to 8.4 in goss.yaml and readme.md

* Update PHP version to 8.4 in .github/workflows/php-8.4-publish.yml

* Update PHP version to 8.4 in readme.md
  • Loading branch information
pushpak1300 authored Oct 24, 2024
1 parent 3507175 commit 8ceb734
Show file tree
Hide file tree
Showing 5 changed files with 156 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/php-8.4-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: php-8.4-publish
on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: ./.github/actions/docker-publish
name: Build and Publish (8.4)
with:
version: 8.4
docker-username: ${{ secrets.DOCKER_USERNAME }}
docker-password: ${{ secrets.DOCKER_TOKEN }}

validate:
runs-on: ubuntu-latest
needs: publish
container:
image: kirschbaumdevelopment/laravel-test-runner:8.3

steps:
- uses: actions/checkout@v2
- run: |
curl -fsSL https://goss.rocks/install | GOSS_VER=v${GOSS_VERSION} sh
goss --gossfile 8.3/goss.yaml validate
55 changes: 55 additions & 0 deletions 8.4/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
FROM ubuntu:22.04
LABEL maintainer="Pushpak Chhajed <pushpak1330#gmail.com>"
ARG DEBIAN_FRONTEND=noninteractive

ENV PHP_VERSION="8.4"
ENV GOSS_VERSION="0.4.4"
ENV NODE_MAJOR="20"

RUN apt-get update && apt-get install -y software-properties-common curl ca-certificates gnupg
RUN add-apt-repository ppa:ondrej/php -y
RUN add-apt-repository ppa:git-core/ppa -y
RUN apt-get update -y
RUN apt-get install -y \
unzip \
php${PHP_VERSION}-cli \
php${PHP_VERSION}-gd \
php${PHP_VERSION}-ldap \
php${PHP_VERSION}-mbstring \
php${PHP_VERSION}-mysql \
php${PHP_VERSION}-pgsql \
php${PHP_VERSION}-sqlite3 \
php${PHP_VERSION}-xml \
php${PHP_VERSION}-xsl \
php${PHP_VERSION}-zip \
php${PHP_VERSION}-curl \
php${PHP_VERSION}-soap \
php${PHP_VERSION}-gmp \
php${PHP_VERSION}-bcmath \
php${PHP_VERSION}-intl \
php${PHP_VERSION}-imap \
php${PHP_VERSION}-phpdbg \
php${PHP_VERSION}-bz2 \
php${PHP_VERSION}-redis

# composer
ENV COMPOSER_HOME=/composer
ENV PATH=./vendor/bin:/composer/vendor/bin:/root/.yarn/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV COMPOSER_ALLOW_SUPERUSER=1
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

# mysql client
RUN apt-get install -y mysql-client

# git
RUN apt-get install -y git

# node
RUN mkdir -p /etc/apt/keyrings
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
RUN apt-get update && apt-get install nodejs -y


# yarn
RUN npm install -g yarn
39 changes: 39 additions & 0 deletions 8.4/goss.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
command:
node --version:
exit-status: 0
stdout:
- "v20"
yarn --version:
exit-status: 0
npm --version:
exit-status: 0
stdout:
- "10"
git --version:
exit-status: 0
composer --version:
exit-status: 0
php --version:
exit-status: 0
stdout:
- "8.4"
php -m:
exit-status: 0
stdout:
- bcmath
- calendar
- exif
- gd
- iconv
- imap
- intl
- ldap
- mbstring
- mysqli
- pcntl
- pdo_mysql
- pdo_pgsql
- pgsql
- soap
- xml
- zip
31 changes: 31 additions & 0 deletions 8.4/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Laravel Test Runner - PHP 8.4

Docker Container with PHP 8.4 and extensions to be compatible with most Laravel applications. Also installed on this container we have Composer and NodeJS/NPM/Yarn.

## Building and pushing the image

**Build**:

```
docker build --pull -t kirschbaumdevelopment/laravel-test-runner .
```

**Tag**:

```
docker tag kirschbaumdevelopment/laravel-test-runner:latest kirschbaumdevelopment/laravel-test-runner:8.4
```

**Push**:

```
docker push kirschbaumdevelopment/laravel-test-runner:8.4
```

## Credits

- [Pushpak Chhajed](/~https://github.com/pushpak1300)

## Sponsorship

Development of this package is sponsored by Kirschbaum Development Group, a developer driven company focused on problem solving, team building, and community. Learn more [about us](https://kirschbaumdevelopment.com) or [join us](https://careers.kirschbaumdevelopment.com)!
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ This is a [docker container](https://cloud.docker.com/u/kirschbaumdevelopment/re

| PHP version | Link | Status | Container Tag |
| ---------- |-----------------------------------------------------------------------------------------------| ------ | ------------- |
| 8.4 | [πŸ”—](/~https://github.com/kirschbaum-development/laravel-test-runner-container/blob/master/8.4) | [![Actions Status](/~https://github.com/kirschbaum-development/laravel-test-runner-container/workflows/php-8.4-publish/badge.svg)](/~https://github.com/kirschbaum-development/laravel-test-runner-container/actions) | kirschbaumdevelopment/laravel-test-runner:8.4 |
| 8.3 | [πŸ”—](/~https://github.com/kirschbaum-development/laravel-test-runner-container/blob/master/8.3) | [![Actions Status](/~https://github.com/kirschbaum-development/laravel-test-runner-container/workflows/php-8.3-publish/badge.svg)](/~https://github.com/kirschbaum-development/laravel-test-runner-container/actions) | kirschbaumdevelopment/laravel-test-runner:8.3 |
| 8.2 | [πŸ”—](/~https://github.com/kirschbaum-development/laravel-test-runner-container/blob/master/8.2) | [![Actions Status](/~https://github.com/kirschbaum-development/laravel-test-runner-container/workflows/php-8.2-validate/badge.svg)](/~https://github.com/kirschbaum-development/laravel-test-runner-container/actions) | kirschbaumdevelopment/laravel-test-runner:8.2 |
| 8.1 | [πŸ”—](/~https://github.com/kirschbaum-development/laravel-test-runner-container/blob/master/8.1) | [![Actions Status](/~https://github.com/kirschbaum-development/laravel-test-runner-container/workflows/php-8.1-validate/badge.svg)](/~https://github.com/kirschbaum-development/laravel-test-runner-container/actions) | kirschbaumdevelopment/laravel-test-runner:8.1 |
Expand Down

0 comments on commit 8ceb734

Please sign in to comment.