Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
83b31d5c37 | ||
|
|
2ab9a9c1d5 | ||
|
|
fdb2ce8155 | ||
|
|
39f26ae755 | ||
|
|
bc7dd69990 | ||
|
|
d0440712b5 | ||
|
|
4db9a0f224 | ||
|
|
88f12b18bc |
@@ -9,48 +9,96 @@ on:
|
|||||||
schedule:
|
schedule:
|
||||||
- cron: "0 1 * * *"
|
- cron: "0 1 * * *"
|
||||||
|
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: docker-build-prod
|
group: docker-build-prod
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
|
||||||
|
# ─── APACHE ───────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
build-apache-amd64:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
|
contents: read
|
||||||
packages: write
|
packages: write
|
||||||
container:
|
container:
|
||||||
image: catthehacker/ubuntu:act-latest
|
image: catthehacker/ubuntu:act-latest
|
||||||
|
outputs:
|
||||||
|
digest: ${{ steps.build.outputs.digest }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: docker/setup-buildx-action@v1
|
- uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
- uses: docker/login-action@v3
|
- uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: git.steelants.cz
|
registry: git.steelants.cz
|
||||||
username: ${{ secrets.GITEAUSER }}
|
username: ${{ secrets.GITEAUSER }}
|
||||||
password: ${{ secrets.GITEAPASSWD }}
|
password: ${{ secrets.GITEAPASSWD }}
|
||||||
|
- id: build
|
||||||
- uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: apache
|
context: apache
|
||||||
push: true
|
platforms: linux/amd64
|
||||||
tags: git.steelants.cz/steelants/docker_php_base:latest
|
outputs: type=image,name=git.steelants.cz/steelants/docker_php_base,push-by-digest=true,name-canonical=true,push=true
|
||||||
|
|
||||||
|
build-apache-arm64:
|
||||||
|
runs-on: ubuntu-latest-arm
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
container:
|
||||||
|
image: catthehacker/ubuntu:act-latest
|
||||||
|
outputs:
|
||||||
|
digest: ${{ steps.build.outputs.digest }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: docker/setup-buildx-action@v1
|
||||||
|
- uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: git.steelants.cz
|
||||||
|
username: ${{ secrets.GITEAUSER }}
|
||||||
|
password: ${{ secrets.GITEAPASSWD }}
|
||||||
|
- id: build
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: apache
|
||||||
|
platforms: linux/arm64
|
||||||
|
outputs: type=image,name=git.steelants.cz/steelants/docker_php_base,push-by-digest=true,name-canonical=true,push=true
|
||||||
|
|
||||||
|
manifest-apache:
|
||||||
|
needs: [build-apache-amd64, build-apache-arm64]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
container:
|
||||||
|
image: catthehacker/ubuntu:act-latest
|
||||||
|
steps:
|
||||||
|
- uses: docker/setup-buildx-action@v1
|
||||||
|
- uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: git.steelants.cz
|
||||||
|
username: ${{ secrets.GITEAUSER }}
|
||||||
|
password: ${{ secrets.GITEAPASSWD }}
|
||||||
|
- name: Create and push multi-arch manifest
|
||||||
|
run: |
|
||||||
|
docker buildx imagetools create -t git.steelants.cz/steelants/docker_php_base:latest \
|
||||||
|
git.steelants.cz/steelants/docker_php_base@${{ needs.build-apache-amd64.outputs.digest }} \
|
||||||
|
git.steelants.cz/steelants/docker_php_base@${{ needs.build-apache-arm64.outputs.digest }}
|
||||||
|
|
||||||
# ✅ Notifikace při úspěšném deploymentu
|
|
||||||
- name: Discord Webhook Success
|
- name: Discord Webhook Success
|
||||||
if: success()
|
if: success()
|
||||||
uses: tsickert/discord-webhook@v6.0.0
|
uses: tsickert/discord-webhook@v6.0.0
|
||||||
with:
|
with:
|
||||||
webhook-url: ${{ secrets.WEBHOOK_URL }}
|
webhook-url: ${{ secrets.WEBHOOK_URL }}
|
||||||
content: |
|
content: |
|
||||||
✅ APACHE - Build successful!
|
✅ APACHE - Build successful! (amd64 + arm64)
|
||||||
Repo: ${{ github.repository }}
|
Repo: ${{ github.repository }}
|
||||||
Branch: ${{ github.ref_name }}
|
Branch: ${{ github.ref_name }}
|
||||||
Commit: ${{ github.sha }}
|
Commit: ${{ github.sha }}
|
||||||
Version: ${{ env.release_version }}
|
|
||||||
|
|
||||||
# ❌ Notifikace při neúspěšném deploymentu
|
|
||||||
- name: Discord Webhook Failure
|
- name: Discord Webhook Failure
|
||||||
if: failure()
|
if: failure()
|
||||||
uses: tsickert/discord-webhook@v6.0.0
|
uses: tsickert/discord-webhook@v6.0.0
|
||||||
@@ -61,36 +109,3 @@ jobs:
|
|||||||
Repo: ${{ github.repository }}
|
Repo: ${{ github.repository }}
|
||||||
Branch: ${{ github.ref_name }}
|
Branch: ${{ github.ref_name }}
|
||||||
Commit: ${{ github.sha }}
|
Commit: ${{ github.sha }}
|
||||||
Version: ${{ env.release_version }}
|
|
||||||
|
|
||||||
- uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
context: fmp-alpine
|
|
||||||
push: true
|
|
||||||
tags: git.steelants.cz/steelants/docker_php_base:fpm-alpine-latest
|
|
||||||
|
|
||||||
# ✅ Notifikace při úspěšném deploymentu
|
|
||||||
- name: Discord Webhook Success
|
|
||||||
if: success()
|
|
||||||
uses: tsickert/discord-webhook@v6.0.0
|
|
||||||
with:
|
|
||||||
webhook-url: ${{ secrets.WEBHOOK_URL }}
|
|
||||||
content: |
|
|
||||||
✅ FMP - ALPINE - Build successful!
|
|
||||||
Repo: ${{ github.repository }}
|
|
||||||
Branch: ${{ github.ref_name }}
|
|
||||||
Commit: ${{ github.sha }}
|
|
||||||
Version: ${{ env.release_version }}
|
|
||||||
|
|
||||||
# ❌ Notifikace při neúspěšném deploymentu
|
|
||||||
- name: Discord Webhook Failure
|
|
||||||
if: failure()
|
|
||||||
uses: tsickert/discord-webhook@v6.0.0
|
|
||||||
with:
|
|
||||||
webhook-url: ${{ secrets.WEBHOOK_URL }}
|
|
||||||
content: |
|
|
||||||
❌ FMP - ALPINE - Build failed!
|
|
||||||
Repo: ${{ github.repository }}
|
|
||||||
Branch: ${{ github.ref_name }}
|
|
||||||
Commit: ${{ github.sha }}
|
|
||||||
Version: ${{ env.release_version }}
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
```bash
|
||||||
|
docker build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 -t git.steelants.cz/steelants/docker_php_base:latest ./apache
|
||||||
|
docker push git.steelants.cz/steelants/docker_php_base:latest
|
||||||
|
```
|
||||||
@@ -25,6 +25,10 @@ RUN --mount=type=cache,target=/var/cache/apt \
|
|||||||
unzip \
|
unzip \
|
||||||
zlib1g-dev \
|
zlib1g-dev \
|
||||||
libicu-dev \
|
libicu-dev \
|
||||||
|
libjpeg-dev \
|
||||||
|
libpng-dev \
|
||||||
|
libwebp-dev \
|
||||||
|
libfreetype6-dev \
|
||||||
g++ \
|
g++ \
|
||||||
nodejs \
|
nodejs \
|
||||||
npm \
|
npm \
|
||||||
@@ -56,6 +60,8 @@ RUN a2enmod rewrite
|
|||||||
|
|
||||||
RUN docker-php-ext-configure intl
|
RUN docker-php-ext-configure intl
|
||||||
|
|
||||||
|
RUN docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp
|
||||||
|
|
||||||
# Install PHP extensions
|
# Install PHP extensions
|
||||||
RUN docker-php-ext-configure \
|
RUN docker-php-ext-configure \
|
||||||
opcache --enable-opcache
|
opcache --enable-opcache
|
||||||
@@ -77,6 +83,10 @@ RUN docker-php-ext-enable \
|
|||||||
imagick \
|
imagick \
|
||||||
opcache
|
opcache
|
||||||
|
|
||||||
|
# Fail fast if the JPEG delegate did not make it into the image
|
||||||
|
RUN php -r 'if (!in_array("JPEG", Imagick::queryFormats())) { fwrite(STDERR, "ERROR: imagick built without JPEG delegate\n"); exit(1); } echo "imagick JPEG delegate OK\n";' && \
|
||||||
|
php -r 'if (!function_exists("imagecreatefromjpeg")) { fwrite(STDERR, "ERROR: gd built without JPEG support\n"); exit(1); } echo "gd JPEG OK\n";'
|
||||||
|
|
||||||
# PHP
|
# PHP
|
||||||
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_FILE" && \
|
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_FILE" && \
|
||||||
sed -i "s|memory_limit = 128M|memory_limit = 256M |g" "$PHP_INI_FILE" && \
|
sed -i "s|memory_limit = 128M|memory_limit = 256M |g" "$PHP_INI_FILE" && \
|
||||||
|
|||||||
Reference in New Issue
Block a user