Skip to content
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

[devkit] php devkit #195

Merged
merged 1 commit into from
Apr 8, 2024
Merged
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
15 changes: 15 additions & 0 deletions .docker/php.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM debian:unstable AS build
ARG VERSION
RUN apt update && apt install -y build-essential wget git libxml2-dev libsqlite3-dev libssl-dev autoconf
RUN adduser --disabled-password dev
USER dev
RUN wget -nv https://www.php.net/distributions/php-${VERSION}.tar.gz -O - \
| tar -xz -C /tmp
RUN cd /tmp/php-${VERSION} && ./configure --prefix=/home/dev/.php --with-openssl && make -j install
ENV PATH="/home/dev/.php/bin:$PATH"
RUN curl https://getcomposer.org/installer | php -- --quiet --install-dir=/home/dev/.php/bin/ --filename=composer
RUN git clone https://github.com/Ponup/php-sdl ~/php-sdl \
&& cd ~/php-sdl && phpize && ./configure && make -j

FROM scratch
COPY --from=build /home/dev/.php /home/dev/.php
38 changes: 38 additions & 0 deletions .github/workflows/devkit-php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Devkit (php)

on:
push:
branches:
- master
- main
paths:
- '.docker/php.dockerfile'
- '.github/workflows/devkit-php.yml'
pull_request:
paths:
- '.docker/php.dockerfile'
- '.github/workflows/devkit-php.yml'
workflow_dispatch:

jobs:
build:
name: Build
runs-on: ubuntu-22.04
matrix:
lang: ["php"]
version: ["8.3.4"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Publish
uses: elgohr/Publish-Docker-Github-Action@main
with:
name: shish2k/rosettaboy-devkit-${{ matrix.lang }}
dockerfile: .docker/${{ matrix.lang }}.dockerfile
buildoptions: "--build-arg VERSION=${{ matrix.version }}"
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
tags: ${{ matrix.version }}
platforms: linux/amd64,linux/arm64