name: Danger CI

on:
  pull_request:
    types: [ labeled, synchronize, opened, reopened ]

jobs:
  build:
    name: Danger
    runs-on: macos-15

    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Setup environment
        run: 
          brew install danger/tap/danger-swift swiftlint

      - name: Danger
        run: 
          danger-swift ci
        env: 
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}