From cdb5afa6a11fdd0fabe06b7c31769118188de966 Mon Sep 17 00:00:00 2001 From: Gaelle Fournier Date: Fri, 14 Jun 2024 12:51:50 +0200 Subject: [PATCH] feat(ci): check licenses on PRs --- .github/workflows/licenses.yaml | 62 +++++++++++++++++++++++++++++++++ .github/workflows/security.yaml | 2 +- 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/licenses.yaml diff --git a/.github/workflows/licenses.yaml b/.github/workflows/licenses.yaml new file mode 100644 index 0000000000..46b7e68851 --- /dev/null +++ b/.github/workflows/licenses.yaml @@ -0,0 +1,62 @@ +# --------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# --------------------------------------------------------------------------- + +name: licenses + +on: + pull_request: + branches: + - main + - "release-*" + paths-ignore: + - 'proposals/**' + - '**.adoc' + - '**.md' + - 'KEYS' + - 'LICENSE' + - 'NOTICE' + push: + branches: + - main + - "release-*" + paths-ignore: + - 'proposals/**' + - '**.md' + - '**.adoc' + - 'KEYS' + - 'LICENSE' + - 'NOTICE' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + +jobs: + licenses: + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v4 + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version-file: 'go.mod' + check-latest: true + - name: licenses + shell: bash + run: | + make check-licenses \ No newline at end of file diff --git a/.github/workflows/security.yaml b/.github/workflows/security.yaml index 23d9b49e54..cc4ccc964d 100644 --- a/.github/workflows/security.yaml +++ b/.github/workflows/security.yaml @@ -51,7 +51,7 @@ jobs: with: go-version-file: 'go.mod' check-latest: true - - name: lint + - name: vuln shell: bash run: | make vuln