-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* php8 and php81 docker build * add github action to build image * fix * push only when master
- Loading branch information
Showing
7 changed files
with
181 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Docker Image CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
base-image: [fpm-alpine, cli-alpine] | ||
php: [7.4, '8.0', 8.1] | ||
include: | ||
- base-image: fpm-alpine | ||
prefix: fpm | ||
- base-image: cli-alpine | ||
prefix: cli | ||
|
||
name: PHP:${{ matrix.php }} - IMAGE:${{ matrix.base-image }} - PREFIX:${{ matrix.prefix }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: docker login | ||
env: | ||
DOCKER_USER: ${{secrets.DOCKER_USER}} | ||
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} | ||
run: | | ||
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD | ||
- name: Build the Docker image | ||
env: | ||
REPO_NAME: norby/php-alpine | ||
BASE_IMAGE: ${{ matrix.base-image }} | ||
VERSION: ${{ matrix.php }} | ||
EXTRA_TAGS: "${{ matrix.php }}-${{ matrix.prefix }}" | ||
run: ./hooks/build.sh | ||
|
||
- name: Docker Push | ||
if: github.ref == 'refs/heads/master' | ||
run: ./hooks/push.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
for tag in $(docker images norby/php-alpine --format "{{.Tag}}"); | ||
do | ||
docker push "norby/php-alpine:${tag}" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#!/bin/bash | ||
|
||
set -eux \ | ||
&& apk update \ | ||
&& apk upgrade \ | ||
&& apk add --no-cache --virtual .build_deps \ | ||
$PHPIZE_DEPS \ | ||
curl-dev \ | ||
freetype-dev \ | ||
imagemagick-dev \ | ||
libtool \ | ||
libxml2-dev \ | ||
libpng-dev \ | ||
libwebp-dev \ | ||
libjpeg-turbo-dev \ | ||
make \ | ||
oniguruma-dev \ | ||
gcc > /dev/null \ | ||
&& apk add --no-cache \ | ||
zlib-dev \ | ||
libzip-dev \ | ||
libgomp \ | ||
curl \ | ||
imagemagick \ | ||
mysql-client \ | ||
libintl \ | ||
libpng \ | ||
libjpeg-turbo \ | ||
icu-dev \ | ||
icu \ | ||
freetype \ | ||
vim \ | ||
unzip \ | ||
composer \ | ||
nodejs \ | ||
bash > /dev/null \ | ||
&& docker-php-ext-configure \ | ||
gd --with-freetype=/usr/include/freetype2/ --with-jpeg=/usr/include/ --with-webp=/usr/include/webp > /dev/null \ | ||
&& docker-php-ext-install \ | ||
mbstring \ | ||
pdo \ | ||
pdo_mysql \ | ||
mysqli \ | ||
pcntl \ | ||
tokenizer \ | ||
xml \ | ||
zip \ | ||
intl \ | ||
ctype \ | ||
bcmath \ | ||
-j$(nproc) gd > /dev/null \ | ||
&& pecl install \ | ||
-o -f imagick > /dev/null \ | ||
&& docker-php-ext-enable \ | ||
gd \ | ||
imagick \ | ||
mysqli > /dev/null \ | ||
&& apk del --no-cache -f .build_deps \ | ||
&& rm -f /var/cache/apk/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/bin/bash | ||
|
||
set -eux \ | ||
&& apk update \ | ||
&& apk upgrade \ | ||
&& apk add --no-cache --virtual .build_deps \ | ||
$PHPIZE_DEPS \ | ||
curl-dev \ | ||
freetype-dev \ | ||
imagemagick-dev \ | ||
libtool \ | ||
libxml2-dev \ | ||
libpng-dev \ | ||
libwebp-dev \ | ||
libjpeg-turbo-dev \ | ||
make \ | ||
oniguruma-dev \ | ||
gcc > /dev/null \ | ||
&& apk add --no-cache \ | ||
zlib-dev \ | ||
libzip-dev \ | ||
libgomp \ | ||
curl \ | ||
imagemagick \ | ||
mysql-client \ | ||
libintl \ | ||
libpng \ | ||
libjpeg-turbo \ | ||
icu-dev \ | ||
icu \ | ||
freetype \ | ||
vim \ | ||
unzip \ | ||
composer \ | ||
nodejs \ | ||
bash > /dev/null \ | ||
&& docker-php-ext-configure \ | ||
gd --with-freetype=/usr/include/freetype2/ --with-jpeg=/usr/include/ --with-webp=/usr/include/webp > /dev/null \ | ||
&& docker-php-ext-install \ | ||
mbstring \ | ||
pdo \ | ||
pdo_mysql \ | ||
mysqli \ | ||
pcntl \ | ||
xml \ | ||
zip \ | ||
intl \ | ||
ctype \ | ||
bcmath \ | ||
-j$(nproc) gd > /dev/null \ | ||
&& pecl install \ | ||
-o -f imagick > /dev/null \ | ||
&& docker-php-ext-enable \ | ||
gd \ | ||
imagick \ | ||
mysqli > /dev/null \ | ||
&& apk del --no-cache -f .build_deps \ | ||
&& rm -f /var/cache/apk/* |