Skip to content

πŸ› Double brackets for vars #22

πŸ› Double brackets for vars

πŸ› Double brackets for vars #22

Workflow file for this run

name: Docker Image CI
on:
push:
branches: ['main']
pull_request:
branches: ['main']
schedule:
- cron: '0 2 * * 0'
jobs:
build-and-push-image:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['8.2', '8.3']
frankenphp-version: ['1.1', '1.2']
steps:
- name: Git checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
trucksnl/frankenphp
ghcr.io/trucksnl/frankenphp
- 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
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
file: ./Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: |
linux/amd64
linux/arm64
push: ${{ github.event_name != 'pull_request' }}
build-contexts: |
php=docker-image://dunglas/frankenphp:${{ matrix.frankenphp-version }}-php${{ matrix.php-version }}-alpine
labels: ${{ steps.meta.outputs.labels }}
tags: |
trucksnl/frankenphp:${{ matrix.frankenphp-version }}-php${{ matrix.php-version }}-alpine
trucksnl/frankenphp:${{ matrix.frankenphp-version }}-php${{ matrix.php-version }}-alpine-v${{ github.run_number }}
ghcr.io/trucksnl/frankenphp:${{ matrix.frankenphp-version }}-php${{ matrix.php-version }}-alpine
ghcr.io/trucksnl/frankenphp:${{ matrix.frankenphp-version }}-php${{ matrix.php-version }}-alpine-v${{ github.run_number }}