This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch always-check-license-copy
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/always-check-license-copy by 
this push:
     new 3bb4391b79 chore(actions): generate FOSSA report on master, and ALWAYS 
check for Apache license copy
3bb4391b79 is described below

commit 3bb4391b79946009ff2f2966106fc776a2bfc833
Author: Evan Rusackas <[email protected]>
AuthorDate: Mon Jan 29 13:15:39 2024 -0700

    chore(actions): generate FOSSA report on master, and ALWAYS check for 
Apache license copy
---
 ...license-check.yml => generate-FOSSA-report.yml} | 10 +---
 .github/workflows/license-check.yml                | 65 ++++------------------
 2 files changed, 13 insertions(+), 62 deletions(-)

diff --git a/.github/workflows/license-check.yml 
b/.github/workflows/generate-FOSSA-report.yml
similarity index 88%
copy from .github/workflows/license-check.yml
copy to .github/workflows/generate-FOSSA-report.yml
index e9b75a1009..3e7b33c1a0 100644
--- a/.github/workflows/license-check.yml
+++ b/.github/workflows/generate-FOSSA-report.yml
@@ -1,11 +1,9 @@
-name: License Check
+name: Generate FOSSA report
 
 on:
   push:
     branches:
-      - 'master'
-  pull_request:
-    types: [synchronize, opened, reopened, ready_for_review]
+      - "master"
 
 jobs:
   config:
@@ -24,7 +22,7 @@ jobs:
   license_check:
     needs: config
     if: needs.config.outputs.has-secrets
-    name: License Check
+    name: Generate Report
     runs-on: ubuntu-20.04
     steps:
       - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
@@ -63,5 +61,3 @@ jobs:
             echo "No dependency changes... skiping fossa check"
           fi
         shell: bash
-      - name: Run license check
-        run: ./scripts/check_license.sh
diff --git a/.github/workflows/license-check.yml 
b/.github/workflows/license-check.yml
index e9b75a1009..9e6a5d359a 100644
--- a/.github/workflows/license-check.yml
+++ b/.github/workflows/license-check.yml
@@ -1,67 +1,22 @@
-name: License Check
+name: License Template Check
 
 on:
-  push:
-    branches:
-      - 'master'
   pull_request:
     types: [synchronize, opened, reopened, ready_for_review]
 
 jobs:
-  config:
-    runs-on: "ubuntu-latest"
-    outputs:
-      has-secrets: ${{ steps.check.outputs.has-secrets }}
-    steps:
-      - name: "Check for secrets"
-        id: check
-        shell: bash
-        run: |
-          if [ -n "${{ (secrets.FOSSA_API_KEY != '' ) || '' }}" ]; then
-            echo "has-secrets=1" >> "$GITHUB_OUTPUT"
-          fi
-
   license_check:
-    needs: config
-    if: needs.config.outputs.has-secrets
     name: License Check
     runs-on: ubuntu-20.04
     steps:
-      - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
-        uses: actions/checkout@v3
-        with:
-          persist-credentials: false
-          submodules: recursive
-      - name: Setup Java
-        uses: actions/setup-java@v1
-        with:
-          java-version: 8
-      - name: Generate fossa report
-        env:
-          FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
-        run: |
-          set -eo pipefail
-          if [[ "${{github.event_name}}" != "pull_request" ]]; then
-            ./scripts/fossa.sh
-            exit 0
-          fi
-
-          URL="https://api.github.com/repos/${{ github.repository }}/pulls/${{ 
github.event.pull_request.number }}/files"
-          FILES=$(curl -s -X GET -G $URL | jq -r '.[] | .filename')
-
-          cat<<EOF
-          CHANGED FILES:
-          $FILES
-
-          EOF
-
-          if [[ "${FILES}" =~ 
(.*package*\.json|requirements\/[a-z_-]+\.txt|setup\.py) ]]; then
-            echo "Detected dependency changes... running fossa check"
-
-            ./scripts/fossa.sh
-          else
-            echo "No dependency changes... skiping fossa check"
-          fi
-        shell: bash
+      # - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
+      #   uses: actions/checkout@v3
+      #   with:
+      #     persist-credentials: false
+      #     submodules: recursive
+      # - name: Setup Java
+      #   uses: actions/setup-java@v1
+      #   with:
+      #     java-version: 8
       - name: Run license check
         run: ./scripts/check_license.sh

Reply via email to