name: CI

on:
  push:
    main:
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4

      - uses: extractions/setup-just@95b912dc5d3ed106a72907f2f9b91e76d60bdb76 # 1.5.0

      - name: Build the Docker image
        run: |
          docker image build . \
            --tag build-configs

      - name: Run PHPStan
        run: |
          docker run \
            --rm \
            --interactive \
            --entrypoint phpstan \
            build-configs \
              --no-progress