name: Danger CI

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

jobs:
  build:
    name: Danger
    runs-on: ubuntu-latest
    timeout-minutes: 15

    concurrency:
      # Only allow a single run of this workflow on each branch, automatically cancelling older runs.
      group: ${{ format('danger-ci-{0}', github.ref) }}
      cancel-in-progress: true

    steps:
      - uses: actions/checkout@v6
      - name: Danger
        uses: danger/swift@434d7c25f3b02d490a340b23f5e78dd15a5670bc # 3.22.1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
