Skip to content

Commit

Permalink
Full refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
madalinignisca committed Feb 18, 2025
1 parent 4fc19c9 commit d58e42f
Show file tree
Hide file tree
Showing 8 changed files with 202 additions and 38 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Build PHP 8.2 for Magento 2
name: Build PHP 7.4

on:
workflow_dispatch:

jobs:
buildx:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -14,7 +14,6 @@ jobs:
with:
host: ${{ secrets.SSH_ARM64_HOST }}
private-key: ${{ secrets.SSH_PRIVATE_KEY }}
private-key-name: ssh-arm64-host
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
Expand All @@ -28,7 +27,12 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/bake-action@v4
uses: docker/bake-action@v6
with:
push: true
workdir: php/8.2-magento
workdir: php
set: |
*.args.php_version="7.4.33"
*.tags="nosweatframework/php:7.4.33"
38 changes: 38 additions & 0 deletions .github/workflows/php-8.0.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build PHP 8.0

on:
workflow_dispatch:

jobs:
buildx:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up SSH
uses: MrSquaare/ssh-setup-action@v3
with:
host: ${{ secrets.SSH_ARM64_HOST }}
private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: amd64
append: |
- endpoint: ssh://${{ secrets.SSH_ARM64_USER }}@${{ secrets.SSH_ARM64_HOST }}
platforms: arm64
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/bake-action@v6
with:
push: true
workdir: php
set: |
*.args.php_version="8.0.30"
*.tags="nosweatframework/php:8.0.30"
38 changes: 38 additions & 0 deletions .github/workflows/php-8.1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build PHP 8.1

on:
workflow_dispatch:

jobs:
buildx:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up SSH
uses: MrSquaare/ssh-setup-action@v3
with:
host: ${{ secrets.SSH_ARM64_HOST }}
private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: amd64
append: |
- endpoint: ssh://${{ secrets.SSH_ARM64_USER }}@${{ secrets.SSH_ARM64_HOST }}
platforms: arm64
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/bake-action@v6
with:
push: true
workdir: php
set: |
*.args.php_version="8.1.31"
*.tags="nosweatframework/php:8.1.31"
38 changes: 38 additions & 0 deletions .github/workflows/php-8.2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build PHP 8.2

on:
workflow_dispatch:

jobs:
buildx:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up SSH
uses: MrSquaare/ssh-setup-action@v3
with:
host: ${{ secrets.SSH_ARM64_HOST }}
private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: amd64
append: |
- endpoint: ssh://${{ secrets.SSH_ARM64_USER }}@${{ secrets.SSH_ARM64_HOST }}
platforms: arm64
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/bake-action@v6
with:
push: true
workdir: php
set: |
*.args.php_version="8.2.27"
*.tags="nosweatframework/php:8.2.27"
38 changes: 38 additions & 0 deletions .github/workflows/php-8.3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build PHP 8.3

on:
workflow_dispatch:

jobs:
buildx:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up SSH
uses: MrSquaare/ssh-setup-action@v3
with:
host: ${{ secrets.SSH_ARM64_HOST }}
private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: amd64
append: |
- endpoint: ssh://${{ secrets.SSH_ARM64_USER }}@${{ secrets.SSH_ARM64_HOST }}
platforms: arm64
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/bake-action@v6
with:
push: true
workdir: php
set: |
*.args.php_version="8.3.17"
*.tags="nosweatframework/php:8.3.17"
29 changes: 0 additions & 29 deletions php/8.2-magento/Dockerfile

This file was deleted.

35 changes: 35 additions & 0 deletions php/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
ARG php_version=8.2.27

FROM php:${php_version}-fpm

COPY --from=mlocati/php-extension-installer:2.7.24 /usr/bin/install-php-extensions /usr/local/bin/

RUN /usr/local/bin/install-php-extensions \
amqp \
apcu \
bcmath \
calendar \
exif \
ffi \
gd \
gettext \
igbinary \
imagick \
intl \
mcrypt \
mysqlnd \
opcache \
pcntl \
pdo_mysql \
redis \
shmop \
soap \
sockets \
sysvmsg \
sysvsem \
sysvshm \
xml \
xmlreader \
xmlwriter \
xsl \
zip
10 changes: 6 additions & 4 deletions php/8.2-magento/docker-bake.hcl → php/docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
group "default" {
targets = [
"default"
"default",
]
}
target "default" {
context="."
dockerfile="Dockerfile"
platforms = [
"linux/amd64",
"linux/arm64"
"linux/arm64",
]
args = {
"php_version" = "8.3.17-fpm"
}
tags = [
"nosweatframework/php:8.2.13-magento",
"nosweatframework/php:8.2-magento"
"nosweatframework/php:8.3.17",
]
}

0 comments on commit d58e42f

Please sign in to comment.