You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2023/05/31 11:14:47 UTC

[camel-k] 08/08: Moved SBOM generation into Nightly updates

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

acosentino pushed a commit to branch release-1.10.x
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit 4dfe019c21b5b583c295d736d9145c902ee01dc1
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed May 31 13:10:38 2023 +0200

    Moved SBOM generation into Nightly updates
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .github/actions/automatic-updates/action.yml | 12 ++++++
 .github/workflows/generate-sbom-main.yml     | 64 ----------------------------
 2 files changed, 12 insertions(+), 64 deletions(-)

diff --git a/.github/actions/automatic-updates/action.yml b/.github/actions/automatic-updates/action.yml
index 343309cb3..8cf480537 100644
--- a/.github/actions/automatic-updates/action.yml
+++ b/.github/actions/automatic-updates/action.yml
@@ -49,6 +49,18 @@ runs:
         make generate
         make update-docs
         git add -A && git commit -m 'chore: nightly resource refresh' && echo "refresh=1" >> $GITHUB_ENV || echo "No changes to make update-docs"
+    - name: Generate SBOM
+      uses: ./.github/actions/gh-go-mod-generate-sbom
+      with:
+        version: v1
+        args: mod -licenses -json -output camel-k-sbom/camel-k-sbom.json
+    - name: Commit SBOM
+      shell: bash
+      env:
+        CI_USER: "github-actions[bot]"
+        CI_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com"
+      run: |
+        git add camel-k-sbom/camel-k-sbom.json && git commit -m 'Periodic Sync of Camel K Main Branch for SBOM Generation' 
     - name: Push changes
       shell: bash
       if: env.changelog == 1 || env.refresh == 1
diff --git a/.github/workflows/generate-sbom-main.yml b/.github/workflows/generate-sbom-main.yml
deleted file mode 100644
index d69311479..000000000
--- a/.github/workflows/generate-sbom-main.yml
+++ /dev/null
@@ -1,64 +0,0 @@
-# ---------------------------------------------------------------------------
-# 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: Generate SBOM (Camel K)
-
-env:
-  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
-on:
-  schedule:
-  - cron: '30 19 * * 0'
-  workflow_dispatch:
-    inputs:
-
-concurrency:
-  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
-  cancel-in-progress: true
-
-jobs:
-  build:
-    strategy:
-      matrix:
-        # TODO: test an all the supported OS
-        # [ubuntu-20.04, macos-latest, windows-latest]
-        os: [ubuntu-20.04]
-
-    runs-on: ${{ matrix.os }}
-    steps:
-    - name: Checkout code
-      uses: actions/checkout@v2
-      with:
-        persist-credentials: false
-        submodules: recursive
-    - name: Execute Build (make)
-      uses: ./.github/actions/e2e-build
-    - name: Generate SBOM
-      uses: ./.github/actions/gh-go-mod-generate-sbom
-      with:
-        version: v1
-        args: mod -licenses -json -output camel-k-sbom/camel-k-sbom.json
-    - name: Create Pull Request
-      uses: peter-evans/create-pull-request@v5.0.1
-      with:
-        base: main
-        token: ${{ secrets.GITHUB_TOKEN }}
-        branch: automatic-periodic-sync
-        title: '[Github Actions] Periodic Sync Camel K SBOM'
-        body: |
-          Periodic Sync of Camel K Main Branch for SBOM Generation.
-          see https://github.com/apache/camel-k/blob/main/.github/workflows/generate-sbom-main.yml