2023-08-16 18:31:33 +00:00
|
|
|
# Copyright (c) HashiCorp, Inc.
|
|
|
|
# SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
|
|
|
# This workflow checks that the BUSL license is not mentioned anywhere in
|
|
|
|
# a PR targeting a release that should maintain the MPL-2.0 license.
|
|
|
|
name: License Checker
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
2023-10-11 22:15:13 +00:00
|
|
|
# Logic to only apply check 1.1[4,5,6].x branches is in license_checker.sh
|
2023-08-16 20:48:14 +00:00
|
|
|
types: [opened, synchronize]
|
2023-08-16 18:31:33 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
# checks that the diff does not contain any reference to
|
|
|
|
# the BUSL license and thus retains the MPL-2.0 license
|
|
|
|
license-check:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
|
|
|
with:
|
|
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
|
|
fetch-depth: 0 # by default the checkout action doesn't checkout all branches
|
|
|
|
- name: Check for BUSL text in diff
|
|
|
|
run: ./.github/scripts/license_checker.sh
|