name: docker-dryrun

on:
  pull_request:

concurrency:
  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
  cancel-in-progress: true

permissions:
  contents: read

jobs:
  files-changed:
    uses: ./.github/workflows/files-changed.yml
    permissions:
      contents: read

  # dryrun build is slow, so run them in parallel per-platform
  container-amd64:
    if: needs.files-changed.outputs.docker == 'true'
    needs: [files-changed]
    uses: ./.github/workflows/part-docker-dryrun.yml
    with:
      platform: linux/amd64

  container-arm64:
    if: needs.files-changed.outputs.docker == 'true'
    needs: [files-changed]
    uses: ./.github/workflows/part-docker-dryrun.yml
    with:
      platform: linux/arm64

  container-riscv64:
    if: needs.files-changed.outputs.docker == 'true'
    needs: [files-changed]
    uses: ./.github/workflows/part-docker-dryrun.yml
    with:
      platform: linux/riscv64
