Skip to content

Commit

Permalink
Release 7.6.16 - See CHANGELOG.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tiredofit committed Nov 23, 2023
1 parent c2ba43c commit f3d5d2e
Show file tree
Hide file tree
Showing 7 changed files with 356 additions and 5 deletions.
248 changes: 248 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,130 @@ on:
- '**'
- '!README.md'
jobs:
php83_alpine:
env:
DISTRO: "alpine"
DISTRO_VARIANT: "edge"
PHP_BASE: 8.3
build_file: Dockerfile
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Prepare
id: prep
run: |
if [[ "${GITHUB_REF}" == refs/heads/* ]]; then
if [[ "${GITHUB_REF}" == refs/heads/*/* ]] ; then
git_branch="${GITHUB_REPOSITORY/docker-/}:$(echo $GITHUB_REF | sed "s|refs/heads/||g" | sed "s|/|-|g")"
else
git_branch=${GITHUB_REF#refs/heads/}
fi
case "${git_branch}" in
"main" | "master" )
if [ "${{ env.LATEST }}" = "TRUE" ] || [ "${DISTRO_VARIANT}" = "${{ secrets.LATEST }}" ]; then
image_latest=",${GITHUB_REPOSITORY}:latest"
fi
if [ "${DISTRO_VARIANT}" = "${{ secrets.LATEST_ALPINE }}" ]; then
image_latest+=",${GITHUB_REPOSITORY}:${DISTRO}"
fi
branch_tag="${GITHUB_REPOSITORY}:${PHP_BASE},${GITHUB_REPOSITORY}:${PHP_BASE}-${DISTRO}${image_latest}"
;;
"develop" )
branch_tag="${GITHUB_REPOSITORY}:develop"
;;
esac
fi
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
git_tag="${GITHUB_REPOSITORY}:${PHP_BASE}-${DISTRO}-$(echo ${GITHUB_REF} | sed 's|refs/tags/||g')"
fi
if [ -n "${branch_tag}" ] && [ -n "${git_tag}" ]; then
image_tags=${branch_tag},${git_tag}
else
image_tags="${branch_tag}${git_tag}"
fi
echo "dockerhub_repo=${GITHUB_REPOSITORY/docker-/}" >> $GITHUB_ENV
dockerhub_images=$(echo "${image_tags}" | sed "s|${GITHUB_REPOSITORY}|docker.io/${GITHUB_REPOSITORY/docker-/}|g")
ghcr_images=$(echo "${image_tags}" | sed "s|${GITHUB_REPOSITORY}|ghcr.io/${GITHUB_REPOSITORY}|g")
echo "container_images=${dockerhub_images},${ghcr_images}" >> $GITHUB_OUTPUT
- name: Label
id: Label
run: |
image_name=${GITHUB_REPOSITORY/docker-/}
if [ -f "${{ env.build_file }}" ] ; then
sed -i "/FROM .*/a LABEL tiredofit.${image_name}.git_repository=\"https://github.com/${GITHUB_REPOSITORY}\"" ${{ env.build_file }}
sed -i "/FROM .*/a LABEL tiredofit.${image_name}.git_commit=\"${GITHUB_SHA}\"" ${{ env.build_file }}
sed -i "/FROM .*/a LABEL tiredofit.${image_name}.git_committed_by=\"${GITHUB_ACTOR}\"" ${{ env.build_file }}
sed -i "/FROM .*/a LABEL tiredofit.${image_name}.image_build_date=\"$(date +'%Y-%m-%d %H:%M:%S')\"" ${{ env.build_file }}
sed -i "/FROM .*/a LABEL org.opencontainers.image.source https://github.com/${GITHUB_REPOSITORY}" ${{ env.build_file }}
if [ -f "CHANGELOG.md" ] ; then
sed -i "/FROM .*/a LABEL tiredofit.${image_name}.git_changelog_version=\"$(head -n1 ./CHANGELOG.md | awk '{print $2}')\"" ${{ env.build_file }}
mkdir -p install/assets/.changelogs ; cp CHANGELOG.md install/assets/.changelogs/${GITHUB_REPOSITORY/\//_}.md
fi
if [[ $GITHUB_REF == refs/tags/* ]]; then
sed -i "/FROM .*/a LABEL tiredofit.${image_name}.git_tag=\"${GITHUB_REF#refs/tags/v}\"" ${{ env.build_file }}
fi
if [[ $GITHUB_REF == refs/heads/* ]]; then
sed -i "/FROM .*/a LABEL tiredofit.${image_name}.git_branch=\"${GITHUB_REF#refs/heads/}\"" ${{ env.build_file }}
fi
fi
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm,arm64

- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build
if: github.event_name != 'pull_request'
uses: docker/build-push-action@v5
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./${{ env.build_file }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ steps.prep.outputs.container_images }}
build-args: |
DISTRO=${{ env.DISTRO }}
DISTRO_VARIANT=${{ env.DISTRO_VARIANT }}
PHP_BASE=${{ env.PHP_BASE }}
- name: Update Docker Hub Information
if: github.event_name != 'pull_request'
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: ${{ env.dockerhub_repo }}
short-description: ${{ github.event.repository.description }}
readme-filepath: ./README.md
###
php82_alpine:
env:
DISTRO: "alpine"
Expand Down Expand Up @@ -1131,6 +1255,130 @@ jobs:
short-description: ${{ github.event.repository.description }}
readme-filepath: ./README.md
###
php83_debian_bookworm:
env:
DISTRO: "debian"
DISTRO_VARIANT: "bookworm"
PHP_BASE: 8.3
build_file: Dockerfile.debian
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Prepare
id: prep
run: |
if [[ "${GITHUB_REF}" == refs/heads/* ]]; then
if [[ "${GITHUB_REF}" == refs/heads/*/* ]] ; then
git_branch="${GITHUB_REPOSITORY/docker-/}:$(echo $GITHUB_REF | sed "s|refs/heads/||g" | sed "s|/|-|g")"
else
git_branch=${GITHUB_REF#refs/heads/}
fi
case "${git_branch}" in
"main" | "master" )
if [ "${{ env.LATEST }}" = "TRUE" ] || [ "${DISTRO_VARIANT}" = "${{ secrets.LATEST }}" ]; then
image_latest=",${GITHUB_REPOSITORY}:latest"
fi
if [ "${DISTRO_VARIANT}" = "${{ secrets.LATEST_DEBIAN }}" ]; then
image_latest+=",${GITHUB_REPOSITORY}:${DISTRO}"
fi
branch_tag="${GITHUB_REPOSITORY}:${PHP_BASE},${GITHUB_REPOSITORY}:${PHP_BASE}-${DISTRO}-${DISTRO_VARIANT}${image_latest}"
;;
"develop" )
branch_tag="${GITHUB_REPOSITORY}:develop"
;;
esac
fi
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
git_tag="${GITHUB_REPOSITORY}:${PHP_BASE}-${DISTRO}-${DISTRO_VARIANT}-$(echo ${GITHUB_REF} | sed 's|refs/tags/||g')"
fi
if [ -n "${branch_tag}" ] && [ -n "${git_tag}" ]; then
image_tags=${branch_tag},${git_tag}
else
image_tags="${branch_tag}${git_tag}"
fi
echo "dockerhub_repo=${GITHUB_REPOSITORY/docker-/}" >> $GITHUB_ENV
dockerhub_images=$(echo "${image_tags}" | sed "s|${GITHUB_REPOSITORY}|docker.io/${GITHUB_REPOSITORY/docker-/}|g")
ghcr_images=$(echo "${image_tags}" | sed "s|${GITHUB_REPOSITORY}|ghcr.io/${GITHUB_REPOSITORY}|g")
echo "container_images=${dockerhub_images},${ghcr_images}" >> $GITHUB_OUTPUT
- name: Label
id: Label
run: |
image_name=${GITHUB_REPOSITORY/docker-/}
if [ -f "${{ env.build_file }}" ] ; then
sed -i "/FROM .*/a LABEL tiredofit.${image_name}.git_repository=\"https://github.com/${GITHUB_REPOSITORY}\"" ${{ env.build_file }}
sed -i "/FROM .*/a LABEL tiredofit.${image_name}.git_commit=\"${GITHUB_SHA}\"" ${{ env.build_file }}
sed -i "/FROM .*/a LABEL tiredofit.${image_name}.git_committed_by=\"${GITHUB_ACTOR}\"" ${{ env.build_file }}
sed -i "/FROM .*/a LABEL tiredofit.${image_name}.image_build_date=\"$(date +'%Y-%m-%d %H:%M:%S')\"" ${{ env.build_file }}
sed -i "/FROM .*/a LABEL org.opencontainers.image.source https://github.com/${GITHUB_REPOSITORY}" ${{ env.build_file }}
if [ -f "CHANGELOG.md" ] ; then
sed -i "/FROM .*/a LABEL tiredofit.${image_name}.git_changelog_version=\"$(head -n1 ./CHANGELOG.md | awk '{print $2}')\"" ${{ env.build_file }}
mkdir -p install/assets/.changelogs ; cp CHANGELOG.md install/assets/.changelogs/${GITHUB_REPOSITORY/\//_}.md
fi
if [[ $GITHUB_REF == refs/tags/* ]]; then
sed -i "/FROM .*/a LABEL tiredofit.${image_name}.git_tag=\"${GITHUB_REF#refs/tags/v}\"" ${{ env.build_file }}
fi
if [[ $GITHUB_REF == refs/heads/* ]]; then
sed -i "/FROM .*/a LABEL tiredofit.${image_name}.git_branch=\"${GITHUB_REF#refs/heads/}\"" ${{ env.build_file }}
fi
fi
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm,arm64

- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build
if: github.event_name != 'pull_request'
uses: docker/build-push-action@v5
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./${{ env.build_file }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ steps.prep.outputs.container_images }}
build-args: |
DISTRO=${{ env.DISTRO }}
DISTRO_VARIANT=${{ env.DISTRO_VARIANT }}
PHP_BASE=${{ env.PHP_BASE }}
- name: Update Docker Hub Information
if: github.event_name != 'pull_request'
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: ${{ env.dockerhub_repo }}
short-description: ${{ github.event.repository.description }}
readme-filepath: ./README.md
###
php82_debian_bookworm:
env:
DISTRO: "debian"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
Manual Build:
description: 'Manual Build'
required: false
jobs:
jobs:
php82_alpine:
env:
DISTRO: "alpine"
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 7.6.16 2023-11-22 <dave at tiredofit dot ca>

### Added
- Introduce PHP 8.3 support


## 7.6.15 2023-09-13 <dave at tiredofit dot ca>

### Changed
Expand Down
90 changes: 90 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,100 @@ ENV PHP_BASE=${PHP_BASE:-"8.2"} \

### Dependency Installation
RUN case "${PHP_BASE}" in \
8.3 ) export php_folder="83" export build_gnupg=true ;; \
8.2 ) export php_folder="82" export build_gnupg=true ;; \
8.1 ) export php_folder="81" export build_gnupg=true ;; \
*) export php_folder=${PHP_BASE:0:1} ; export build_gnupg=false ;; \
esac ; \
export PHP_8_3_RUN_DEPS=" \
gnu-libiconv \
mariadb-connector-c \
php83 \
php83-bcmath \
php83-brotli \
php83-bz2 \
php83-calendar \
php83-common \
php83-ctype \
php83-curl \
php83-dba \
php83-dom \
php83-embed \
php83-enchant \
php83-exif \
php83-ffi \
php83-fileinfo \
php83-fpm \
php83-ftp \
php83-gd \
php83-gettext \
php83-gmp \
php83-iconv \
php83-imap \
php83-intl \
php83-ldap \
php83-litespeed \
php83-mbstring \
php83-mysqli \
php83-mysqlnd \
php83-odbc \
php83-opcache \
php83-openssl \
php83-pcntl \
php83-pdo \
php83-pdo_dblib \
php83-pdo_mysql \
php83-pdo_odbc \
php83-pdo_pgsql \
php83-pdo_sqlite \
php83-pear \
php83-pecl-amqp \
php83-pecl-apcu \
php83-pecl-ast \
php83-pecl-couchbase \
php83-pecl-igbinary \
php83-pecl-imagick \
php83-pecl-lzf \
php83-pecl-maxminddb \
php83-pecl-memcache \
php83-pecl-memcached \
php83-pecl-mongodb \
php83-pecl-msgpack \
php83-pecl-protobuf \
php83-pecl-psr \
php83-pecl-redis \
php83-pecl-swoole \
php83-pecl-uploadprogress \
php83-pecl-uuid \
php83-pecl-xdebug \
php83-pecl-xhprof \
php83-pecl-xhprof-assets \
php83-pecl-yaml \
php83-pecl-zstd \
php83-pgsql \
php83-phar \
php83-posix \
php83-pspell \
php83-session \
php83-shmop \
php83-simplexml \
php83-snmp \
php83-soap \
php83-sockets \
php83-sodium \
php83-sqlite3 \
php83-sysvmsg \
php83-sysvsem \
php83-sysvshm \
php83-tidy \
php83-tokenizer \
php83-xml \
php83-xmlreader \
php83-xmlwriter \
php83-xsl \
php83-zip \
" && \
\
export PHP_8_2_RUN_DEPS=" \
gnu-libiconv \
mariadb-connector-c \
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ RUN export PHP_7_3_RUN_DEPS=" \
export PHP_8_2_RUN_DEPS=" \
" && \
\
export PHP_8_3_RUN_DEPS=" \
" && \
\
export PHP_ADDITIONAL_MODULES=" \
php$PHP_BASE-ast \
php$PHP_BASE-apcu \
Expand Down
Loading

0 comments on commit f3d5d2e

Please sign in to comment.