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

pcongiusti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/main by this push:
     new 0f4e5c899 fix(ci): badge calculation
0f4e5c899 is described below

commit 0f4e5c899c69a7494d941814618538ad04b3a510
Author: Pasquale Congiusti <[email protected]>
AuthorDate: Thu Aug 22 09:57:59 2024 +0200

    fix(ci): badge calculation
---
 .github/actions/automatic-updates/action.yml | 10 +++---
 .github/actions/coverage-badge/action.yml    | 48 ----------------------------
 2 files changed, 4 insertions(+), 54 deletions(-)

diff --git a/.github/actions/automatic-updates/action.yml 
b/.github/actions/automatic-updates/action.yml
index 5adbb7bec..6672b9a93 100644
--- a/.github/actions/automatic-updates/action.yml
+++ b/.github/actions/automatic-updates/action.yml
@@ -63,7 +63,7 @@ runs:
         make generate codegen update-docs
 
     # Coverage badge
-    - name: Run Test
+    - name: Run Test and get coverage badge
       shell: bash
       run: |
         go test -v ./... -covermode=count -coverprofile=coverage.out
@@ -76,11 +76,9 @@ runs:
         go tool cover -func=coverage.mod.out -o=coverage.mod.out
         grep -o -P '(?<=\(statements\))(.+)(?=%)' coverage.mod.out | xargs > 
coverage
         touch badge.out
-    - name: Go coverage badge
-      uses: ./.github/actions/coverage-badge
-      with:
-        filename: coverage.out
-        target: badge.out
+        wget https://gobinaries.com/github.com/AlexBeauchemin/[email protected] 
-O gobadge
+        gobadge -filename=coverage -target=badge.out
+
     - name: Convert badge to adoc
       shell: bash
       run: |
diff --git a/.github/actions/coverage-badge/action.yml 
b/.github/actions/coverage-badge/action.yml
deleted file mode 100644
index a2bc02168..000000000
--- a/.github/actions/coverage-badge/action.yml
+++ /dev/null
@@ -1,48 +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: Go Coverage Badge
-description: Generate coverage badge for go projects
-inputs:
-  filename:
-    description: 'File containing the tests output'
-    required: true
-    default: coverage.out
-  target:
-    description: 'Target file (default "README.md")'
-    required: false
-
-runs:
-  using: 'composite'
-  steps:
-    - run: |
-        EXTRA_ARGS=""
-
-        if [[ -n '${{ inputs.target }}'  ]]; then
-          EXTRA_ARGS+="-target=${{ inputs.target }}"
-        fi
-        
-        TEMP_DIR=$(mktemp -d)
-        curl -sf 
https://gobinaries.com/github.com/AlexBeauchemin/[email protected] | 
PREFIX=$TEMP_DIR sh
-        $TEMP_DIR/gobadge -filename=${{ inputs.filename }} $EXTRA_ARGS
-        rm -rf $TEMP_DIR
-      id: coverage-badge-go
-      shell: bash
-
-branding:
-  icon: check-circle
-  color: white
\ No newline at end of file

Reply via email to