summaryrefslogtreecommitdiff
path: root/.github/workflows/cla.yml
blob: 757e8ff105ef8da9e1e09cdbf2d2afac9c019e3a (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
name: Verify Contributor License Agreement

on: [pull_request]

jobs:
  cla-validate:

    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - name: Check CLA signing status for ${{ github.actor}}
      run: |
        cat > unsigned-cla.txt <<EOF
          Hello ${{ github.actor }},

          Thank you for your contribution to cloud-init.

          In order for us to merge this pull request, you need
          to have signed the Contributor License Agreement (CLA).
          Please sign the CLA by following our
          hacking guide at:
            https://cloudinit.readthedocs.io/en/latest/topics/hacking.html

          Thanks,
          Your friendly cloud-init upstream
        EOF
        grep -q ': \"${{ github.actor }}\"' ./tools/.lp-to-git-user && \
           echo "Thanks ${{ github.actor }} for signing cloud-init's CLA" || \
           (cat unsigned-cla.txt && exit 1)