Base PHP Images #406
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
name: Base PHP Images | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 6 * * *" # 6 AM Daily | |
push: | |
branches: | |
- main | |
- develop | |
paths: | |
- php/** | |
- .github/workflows/php.yml | |
- php-fpm/** | |
- scripts/build.sh | |
jobs: | |
legacy-php: | |
name: Build Legacy PHP Images | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php_version: [ "7.4", "8.0", "8.1" ] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-qemu-action@v3 | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build & Push Images | |
env: | |
PRE_AUTH: 1 | |
IMAGE_NAME: ghcr.io/wardenenv/centos-php | |
VERSION_LIST: ${{ matrix.php_version }} | |
VARIANT_LIST: cli cli-loaders fpm fpm-loaders | |
PUSH_FLAG: 1 | |
INDEV_FLAG: ${{ github.ref == 'refs/heads/main' && '0' || '1' }} | |
run: bash php/scripts/build.sh | |
php: | |
name: Build PHP Images | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php_version: ["8.2", "8.3", "8.4"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-qemu-action@v3 | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build & Push Images | |
env: | |
PRE_AUTH: 1 | |
IMAGE_NAME: ghcr.io/wardenenv/centos-php | |
VERSION_LIST: ${{ matrix.php_version }} | |
VARIANT_LIST: cli cli-loaders fpm fpm-loaders | |
PUSH_FLAG: 1 | |
INDEV_FLAG: ${{ github.ref == 'refs/heads/main' && '0' || '1' }} | |
run: bash php/scripts/build.sh | |
php-fpm: | |
name: Build Warden PHP-FPM Images ${{ matrix.php_version }} | |
runs-on: ubuntu-latest | |
needs: [php, legacy-php] | |
strategy: | |
matrix: | |
php_version: ["7.4", "8.0", "8.1", "8.2", "8.3", "8.4"] | |
php_variant: ["fpm-loaders"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-qemu-action@v3 | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build & Push Images (GitHub) | |
env: | |
BUILD_GROUP: php-fpm | |
PRE_AUTH: 1 | |
WARDEN_IMAGE_REPOSITORY: ghcr.io/wardenenv | |
PHP_SOURCE_IMAGE: ghcr.io/wardenenv/centos-php | |
PUSH_FLAG: 1 | |
PHP_VERSION: ${{ matrix.php_version }} | |
PHP_VARIANT: ${{ matrix.php_variant }} | |
INDEV_FLAG: ${{ github.ref == 'refs/heads/main' && '0' || '1' }} | |
run: bash scripts/build.sh "${BUILD_GROUP}" | |
- uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build & Push Images (Docker Hub) | |
env: | |
BUILD_GROUP: php-fpm | |
PRE_AUTH: 1 | |
PHP_SOURCE_IMAGE: ghcr.io/wardenenv/centos-php | |
PUSH_FLAG: 1 | |
PHP_VERSION: ${{ matrix.php_version }} | |
PHP_VARIANT: ${{ matrix.php_variant }} | |
INDEV_FLAG: ${{ github.ref == 'refs/heads/main' && '0' || '1' }} | |
run: bash scripts/build.sh "${BUILD_GROUP}" | |
magento1: | |
name: Build Warden PHP-FPM Images ${{ matrix.php_version }} (magento1) | |
runs-on: ubuntu-latest | |
needs: php-fpm | |
strategy: | |
matrix: | |
php_version: ["7.4", "8.0", "8.1", "8.2", "8.3", "8.4"] | |
php_variant: ["fpm-loaders"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-qemu-action@v3 | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build & Push Images | |
env: | |
BUILD_GROUP: php-fpm/magento1 | |
PRE_AUTH: 1 | |
WARDEN_IMAGE_REPOSITORY: ghcr.io/wardenenv | |
PHP_SOURCE_IMAGE: ghcr.io/wardenenv/centos-php | |
PUSH_FLAG: 1 | |
PHP_VERSION: ${{ matrix.php_version }} | |
PHP_VARIANT: ${{ matrix.php_variant }} | |
INDEV_FLAG: ${{ github.ref == 'refs/heads/main' && '0' || '1' }} | |
run: bash scripts/build.sh "${BUILD_GROUP}" | |
- uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build & Push Images (Docker Hub) | |
env: | |
BUILD_GROUP: php-fpm/magento1 | |
PRE_AUTH: 1 | |
PHP_SOURCE_IMAGE: ghcr.io/wardenenv/centos-php | |
PUSH_FLAG: 1 | |
PHP_VERSION: ${{ matrix.php_version }} | |
PHP_VARIANT: ${{ matrix.php_variant }} | |
INDEV_FLAG: ${{ github.ref == 'refs/heads/main' && '0' || '1' }} | |
run: bash scripts/build.sh "${BUILD_GROUP}" | |
magento2: | |
name: Build Warden PHP-FPM Images ${{ matrix.php_version }} (magento2) | |
runs-on: ubuntu-latest | |
needs: php-fpm | |
strategy: | |
matrix: | |
php_version: ["7.4", "8.0", "8.1", "8.2", "8.3", "8.4"] | |
php_variant: ["fpm-loaders"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-qemu-action@v3 | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build & Push Images | |
env: | |
BUILD_GROUP: php-fpm/magento2 | |
PRE_AUTH: 1 | |
WARDEN_IMAGE_REPOSITORY: ghcr.io/wardenenv | |
PHP_SOURCE_IMAGE: ghcr.io/wardenenv/centos-php | |
PUSH_FLAG: 1 | |
PHP_VERSION: ${{ matrix.php_version }} | |
PHP_VARIANT: ${{ matrix.php_variant }} | |
INDEV_FLAG: ${{ github.ref == 'refs/heads/main' && '0' || '1' }} | |
run: bash scripts/build.sh "${BUILD_GROUP}" | |
- uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build & Push Images (Docker Hub) | |
env: | |
BUILD_GROUP: php-fpm/magento2 | |
PRE_AUTH: 1 | |
PHP_SOURCE_IMAGE: ghcr.io/wardenenv/centos-php | |
PUSH_FLAG: 1 | |
PHP_VERSION: ${{ matrix.php_version }} | |
PHP_VARIANT: ${{ matrix.php_variant }} | |
INDEV_FLAG: ${{ github.ref == 'refs/heads/main' && '0' || '1' }} | |
run: bash scripts/build.sh "${BUILD_GROUP}" | |
orocommerce: | |
name: Build Warden PHP-FPM Images ${{ matrix.php_version }} (OroCommerce) | |
runs-on: ubuntu-latest | |
needs: php-fpm | |
strategy: | |
matrix: | |
php_version: ["8.2", "8.3", "8.4"] | |
php_variant: ["fpm-loaders"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-qemu-action@v3 | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build & Push Images | |
env: | |
BUILD_GROUP: php-fpm/orocommerce | |
PRE_AUTH: 1 | |
WARDEN_IMAGE_REPOSITORY: ghcr.io/wardenenv | |
PHP_SOURCE_IMAGE: ghcr.io/wardenenv/centos-php | |
PUSH_FLAG: 1 | |
PHP_VERSION: ${{ matrix.php_version }} | |
PHP_VARIANT: ${{ matrix.php_variant }} | |
INDEV_FLAG: 0 # ${{ github.ref == 'refs/heads/main' && '0' || '1' }} | |
run: bash scripts/build.sh "${BUILD_GROUP}" | |
- uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build & Push Images (Docker Hub) | |
env: | |
BUILD_GROUP: php-fpm/orocommerce | |
PRE_AUTH: 1 | |
PHP_SOURCE_IMAGE: ghcr.io/wardenenv/centos-php | |
PUSH_FLAG: 1 | |
PHP_VERSION: ${{ matrix.php_version }} | |
PHP_VARIANT: ${{ matrix.php_variant }} | |
INDEV_FLAG: ${{ github.ref == 'refs/heads/main' && '0' || '1' }} | |
run: bash scripts/build.sh "${BUILD_GROUP}" |