Skip to content

Build Latest Alpine Images #758

Build Latest Alpine Images

Build Latest Alpine Images #758

name: Build Latest Alpine Images
on:
schedule:
- cron: '47 0 * * *'
workflow_dispatch:
jobs:
build_latest_images:
runs-on: ubuntu-latest
if: ${{ github.repository == 'openswoole/docker-openswoole' }}
strategy:
fail-fast: true
matrix:
php: ["8.1", "8.2", "8.3"]
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Set full names of the Docker image
id: set_full_names
run: echo "::set-output name=full_names::openswoole/swoole:php${{ matrix.php }}-alpine"
-
name: Build and push Docker image openswoole/swoole:php${{ matrix.php }}-alpine
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
file: dockerfiles/latest/php${{ matrix.php }}/alpine/Dockerfile
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x
push: true
tags: ${{ steps.set_full_names.outputs.full_names }}
-
name: Image digest of openswoole/swoole:php${{ matrix.php }}-alpine
run: echo ${{ steps.docker_build.outputs.digest }}