summaryrefslogtreecommitdiff
path: root/.github/workflows/cla-reusable.yml
blob: 3654595ad886d5a20136d2b6f5bc7c42f1133bf5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: "CLA Assistant Reusable"

on:
  workflow_call:
    secrets:
      CLA_PAT:
        description: 'GitHub PAT with repo scope'
        required: true

jobs:
  cla_assistant:
    runs-on: ubuntu-latest
    permissions:
      actions: write
      contents: read
      pull-requests: write
      statuses: write

    steps:
      - name: Run Contributor Assistant
        if: >
          github.event_name == 'pull_request' ||
          github.event_name == 'pull_request_target' ||
          (github.event_name == 'issue_comment' &&
           (github.event.comment.body == 'recheck' ||
            github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA'))
        uses: contributor-assistant/github-action@v2.6.1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          PERSONAL_ACCESS_TOKEN: ${{ secrets.CLA_PAT }}
        with:
          path-to-signatures: 'signatures/version1/cla.json'
          path-to-document: 'https://github.com/vyos/vyos-cla-signatures/blob/current/README.md'
          branch: 'current'
          allowlist: 'vyosbot,pre-commit-ci,dependabot,codecov,mergify,netlify'
          remote-organization-name: 'vyos'
          remote-repository-name: 'vyos-cla-signatures'