Skip to content

Publish Docker Base #186

Publish Docker Base

Publish Docker Base #186

Workflow file for this run

name: Publish Docker Base
on:
workflow_dispatch:
push:
branches: ['main']
paths: ['runtimes/**','.github/workflows/build.yml']
schedule:
- cron: 0 0 * * 3
jobs:
push:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.1,8.2,8.3,8.4]
node: [18,20,22]
exclude:
- php: 8.3
node: 18
- php: 8.4
node: 18
- php: 8.4
node: 20
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: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
context: ./runtimes/common
file: ./runtimes/${{ matrix.php }}/Dockerfile
push: true
build-args: NODE_VERSION=${{ matrix.node }}
tags: |
ariaieboy/sail-runtime-image:${{ matrix.php }}-${{ matrix.node }}
${{ (matrix.node == 20) && format('ariaieboy/sail-runtime-image:{0}',matrix.php) || null }}
cache-from: type=gha
cache-to: type=gha,mode=max