Skip to content

Commit

Permalink
add CI jobs to build platform-based images manually (#56)
Browse files Browse the repository at this point in the history
* build nightly images manually (for testing purposes)

* build nightly images manually from branch "platforms"

* update variables in CI
  • Loading branch information
deminy authored Dec 30, 2024
1 parent b9340fc commit a5e8cd0
Show file tree
Hide file tree
Showing 3 changed files with 121 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/manually_build_nightly_alpine_images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build Nightly Alpine Images Manually

on:
push:
branches:
- platforms
workflow_dispatch:

jobs:
build_nightly_images_manually:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
php: ["8.1", "8.2", "8.3", "8.4"]
platform: ["linux/386", "linux/amd64", "linux/arm/v5", "linux/arm/v7", "linux/arm64/v8", "linux/mips64le", "linux/ppc64le", "linux/s390x"]

steps:
-
name: Checkout
uses: actions/checkout@v4

-
name: Set up QEMU
uses: docker/setup-qemu-action@v3

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

-
name: Build and push Docker image phpswoole/swoole:php${{ matrix.php }}-alpine on ${{ matrix.platform }}
id: docker_build
uses: docker/build-push-action@v5
with:
context: .
file: dockerfiles/nightly/php${{ matrix.php }}/alpine/Dockerfile
platforms: ${{ matrix.platform }}
push: false
tags: phpswoole/swoole:php${{ matrix.php }}-alpine
41 changes: 41 additions & 0 deletions .github/workflows/manually_build_nightly_dev_images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build Nightly Dev Images Manually

on:
push:
branches:
- platforms
workflow_dispatch:

jobs:
build_nightly_images_manually:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
php: ["8.1", "8.2", "8.3", "8.4"]
platform: ["linux/386", "linux/amd64", "linux/arm/v5", "linux/arm/v7", "linux/arm64/v8", "linux/mips64le", "linux/ppc64le", "linux/s390x"]

steps:
-
name: Checkout
uses: actions/checkout@v4

-
name: Set up QEMU
uses: docker/setup-qemu-action@v3

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

-
name: Build and push Docker image phpswoole/swoole:php${{ matrix.php }} on ${ matrix.platform }}
id: docker_build
uses: docker/build-push-action@v5
with:
context: .
file: dockerfiles/nightly/php${{ matrix.php }}/cli/Dockerfile
platforms: ${{ matrix.platform }}
push: false
tags: phpswoole/swoole:php${{ matrix.php }}-dev
build-args: DEV_MODE=true
40 changes: 40 additions & 0 deletions .github/workflows/manually_build_nightly_images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build Nightly Images Manually

on:
push:
branches:
- platforms
workflow_dispatch:

jobs:
build_nightly_images_manually:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
php: ["8.1", "8.2", "8.3", "8.4"]
platform: ["linux/386", "linux/amd64", "linux/arm/v5", "linux/arm/v7", "linux/arm64/v8", "linux/mips64le", "linux/ppc64le", "linux/s390x"]

steps:
-
name: Checkout
uses: actions/checkout@v4

-
name: Set up QEMU
uses: docker/setup-qemu-action@v3

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

-
name: Build and push Docker image phpswoole/swoole:php${{ matrix.php }} on ${{ matrix.platform }}
id: docker_build
uses: docker/build-push-action@v5
with:
context: .
file: dockerfiles/nightly/php${{ matrix.php }}/cli/Dockerfile
platforms: ${{ matrix.platform }}
push: false
tags: phpswoole/swoole:php${{ matrix.php }}

0 comments on commit a5e8cd0

Please sign in to comment.