name: DCO
on:
  workflow_dispatch: {}
  pull_request:
    branches:
      - main
      - release-*

jobs:
  dco_check:
    runs-on: ubuntu-latest
    name: DCO Check
    steps:
    - name: Get PR Commits
      id: 'get-pr-commits'
      uses: tim-actions/get-pr-commits@master
      with:
        token: ${{ secrets.GITHUB_TOKEN }}
    - name: DCO Check
      uses: tim-actions/dco@master
      with:
        commits: ${{ steps.get-pr-commits.outputs.commits }}
