Skip to content

Commit

Permalink
add github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
gregor-j committed Aug 2, 2024
1 parent 54aff9d commit 2ac48e1
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "Build PHP docker image with xdebug module."
on:
push:
pull_request:
schedule:
# https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#schedule
# every tuesday(2) at 06:32 UTC (chosen randomly)
# Minute[0,59] Hour[0,23] DOM[1,31] MOY[1,12] DOW[0,6]
- cron: '32 6 * * 2'

workflow_dispatch:

permissions:
contents: "read"

jobs:
docker:
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "8.1"
- "8.2"
- "8.3"
steps:
- name: "Set up QEMU"
uses: "docker/setup-qemu-action@v2"
- name: "Set up Docker Buildx"
uses: "docker/setup-buildx-action@v2"
- name: "Login to Docker Hub"
uses: "docker/login-action@v2"
with:
username: "${{ secrets.DOCKERHUB_USERNAME }}"
password: "${{ secrets.DOCKERHUB_TOKEN }}"
- name: "Build PHP ${{ matrix.php-version }}"
uses: "docker/build-push-action@v4"
with:
build-args: "PHP_VERSION=${{ matrix.php-version }}-cli"
push: true
tags: "${{ secrets.DOCKERHUB_USERNAME }}/php-xdebug:${{ matrix.php-version }}"

0 comments on commit 2ac48e1

Please sign in to comment.