Skip to content

build-images

build-images #194

Workflow file for this run

name: build-images
on:
push:
branches:
- "main"
schedule:
- cron: "0 0 * * *"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php-image:
- 7.1-cli
- 7.2-cli
- 7.3-cli
- 7.4-cli
- 8.0-cli
- 8.1-cli
- 8.2-cli
- 8.3-cli
composer-image:
- 1
- 2
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: Build and push
id: docker_build
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile
platforms: linux/amd64, linux/arm64
build-args: |
PHP_IMAGE=php:${{ matrix.php-image }}
COMPOSER_IMAGE=composer:${{ matrix.composer-image }}
push: true
tags: rareloop/php-composer:php-${{ matrix.php-image }}-composer-${{ matrix.composer-image }}