Build Latest Images #738
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: Build Latest Images | |
on: | |
schedule: | |
- cron: '47 3 * * *' | |
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 }}" | |
- | |
name: Build and push Docker image openswoole/swoole:php${{ matrix.php }} | |
id: docker_build | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: dockerfiles/latest/php${{ matrix.php }}/cli/Dockerfile | |
platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le | |
push: true | |
tags: ${{ steps.set_full_names.outputs.full_names }} | |
- | |
name: Image digest of openswoole/swoole:php${{ matrix.php }} | |
run: echo ${{ steps.docker_build.outputs.digest }} |