Skip to content

Merge pull request #46 from flownative/feature/drop-nano-htop-again #1879

Merge pull request #46 from flownative/feature/drop-nano-htop-again

Merge pull request #46 from flownative/feature/drop-nano-htop-again #1879

Workflow file for this run

name: Build Docker Image
on:
schedule:
- cron: '30 0 * * *'
push:
branches-ignore:
- '**'
tags:
- 'v*.*.*'
jobs:
build:
strategy:
matrix:
php: [ 8.1.31, 8.2.26, 8.3.14, 8.4.1 ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: 'main'
fetch-depth: 100
- name: Determine latest version
id: latest_version
uses: flownative/action-git-latest-release@v1
- run: |
sudo chmod -R ugo+rwX . && shopt -s dotglob && rm -rf *
- uses: actions/checkout@v4
with:
ref: ${{ steps.latest_version.outputs.tag }}
fetch-depth: 100
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
flavor: |
latest=false
images: |
flownative/php
europe-docker.pkg.dev/flownative/docker/php
labels: |
org.opencontainers.image.title=PHP
org.opencontainers.image.description=Docker image providing PHP CLI and PHP-FPM with various extensions pre-installed
org.opencontainers.image.licenses=MIT
org.opencontainers.image.vendor=Flownative GmbH
org.opencontainers.image.version=${{ matrix.php }}
tags: |
type=semver,pattern={{major}}.{{minor}},value=${{ matrix.php }}
type=semver,pattern={{version}},value=${{ matrix.php }}
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_IO_REGISTRY_USER }}
password: ${{ secrets.DOCKER_IO_REGISTRY_PASSWORD }}
- name: Login to Google Artifacts Registry
uses: docker/login-action@v3
with:
registry: europe-docker.pkg.dev/flownative/docker
username: '_json_key'
password: ${{ secrets.GOOGLE_ARTIFACTS_PASSWORD_DOCKER }}
- name: Build Docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
build-args: |
PHP_VERSION=${{ matrix.php }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
announce:
runs-on: ubuntu-latest
needs: build
steps:
- name: Dispatch to beach-php
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.FLOWNATIVE_BOT_TOKEN }}
repository: flownative/docker-beach-php
event-type: php-images-built
client-payload: '{"image_name": "flownative/docker-php/php"}'
- name: Dispatch to composer
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.FLOWNATIVE_BOT_TOKEN }}
repository: flownative/docker-composer
event-type: php-images-built
client-payload: '{"image_name": "flownative/docker-php/php"}'