name: Publish Play images for smoke tests

on:
  push:
    paths:
      - "smoke-tests/images/play/**"
      - ".github/workflows/publish-smoke-test-play-images.yml"
      - ".github/workflows/reusable-smoke-test-images.yml"
    branches:
      - main

jobs:
  publish:
    uses: ./.github/workflows/reusable-smoke-test-images.yml
    with:
      project: ":smoke-tests:images:play"
      publish: true
      # Play doesn't support Java 16+ yet
      # https://github.com/playframework/playframework/pull/10819
      skip-java-17: true
      skip-java-21: true

  workflow-notification:
    needs:
      - publish
    if: always()
    uses: ./.github/workflows/reusable-workflow-notification.yml
    with:
      success: ${{ needs.publish.result == 'success' }}
