name: Docker Publish (PR Images)

on:
  workflow_dispatch:
  pull_request:
    types: [opened, synchronize, reopened]
    paths:
      - src/**
      - .github/workflows/action_publish-images-**
      - .github/workflows/service_docker-**
      - scripts/**

jobs:
  build-dev-images:
    if: ${{ github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork }}
    uses: ./.github/workflows/service_docker-build-and-publish.yml
    with:
      registry-repositories: "docker.io/serversideup/php-dev" # Set to our development repository
      tag-prefix: "${{ github.event.pull_request.number }}"
      release-type: testing
      authenticate_with_ghcr: false
    secrets: inherit