Skip to content

Commit

Permalink
split jobs for ARM
Browse files Browse the repository at this point in the history
  • Loading branch information
bestlong committed Feb 24, 2025
1 parent 168734b commit 380c709
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 16 deletions.
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

[*.yml]
indent_size = 2
19 changes: 3 additions & 16 deletions .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
matrix:
# "5.6", "7.0", "7.1", "7.2", "7.3",
php_version: ["7.4", "8.0", "8.1", "8.2", "8.3", "8.4"]
continue-on-error: true
# continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -50,20 +50,7 @@ jobs:
uses: docker/build-push-action@v5
with:
file: Dockerfile-${{ matrix.php_version }}
# skip linux/arm64
# platforms: linux/amd64,linux/386,linux/arm/v7,linux/arm/v6
platforms: linux/arm64
# skip linux/arm64, linux/arm/v7,linux/arm/v6
platforms: linux/amd64, linux/386
push: ${{ (github.event_name != 'pull_request') && (github.repository == 'laradock/php-fpm') && (github.ref == 'refs/heads/master') }}
tags: ${{ steps.meta.outputs.tags }}

final_check:
runs-on: ubuntu-latest
needs: build
if: always()
steps:
- name: Fail if any matrix job failed
run: |
if [ "${{ needs.build.result }}" == "failure" ]; then
echo "Some matrix jobs failed, marking workflow as failed."
exit 1
fi
56 changes: 56 additions & 0 deletions .github/workflows/dockerimage_arm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Docker Image CI for ARM

on:
push:
branches: '**'
tags: '**'
schedule:
- cron: 0 0 * * 6

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# "5.6", "7.0", "7.1", "7.2", "7.3",
php_version: ["7.4", "8.0", "8.1", "8.2", "8.3", "8.4"]
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images:
laradock/php-fpm
flavor: |
suffix=-${{ matrix.php_version }}
tags: |
type=schedule,pattern={{date 'YYYYMMDD'}}
type=ref,event=branch
type=semver,pattern={{version}}
type=raw,value=latest
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
if: ${{ (github.repository == 'laradock/php-fpm') && (github.ref == 'refs/heads/master') }}
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}

- name: Build and push
uses: docker/build-push-action@v5
with:
file: Dockerfile-${{ matrix.php_version }}
# platforms: linux/amd64, linux/386, linux/arm64, linux/arm/v7, linux/arm/v6
platforms: linux/arm64
push: ${{ (github.event_name != 'pull_request') && (github.repository == 'laradock/php-fpm') && (github.ref == 'refs/heads/master') }}
tags: ${{ steps.meta.outputs.tags }}

0 comments on commit 380c709

Please sign in to comment.