From 2cc0e85165e531e31f0a33dec9f8c021997c8a86 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 25 Mar 2024 10:56:40 -0400 Subject: [PATCH] fixup! Try to run Coverity Scan on demand --- .github/workflows/build.yml | 7 +++++++ .github/workflows/coverity-scan.yml | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 49ebe75b..1cef6b16 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,9 +6,15 @@ on: branches: ["main"] pull_request: branches: ["main"] + types: + - opened + - synchronize + - reopened + - labeled jobs: build: + if: ${{ (github.event_name == 'labeled' && contains(github.event.label.name, 'covscan')) || github.event_name != 'labeled' }} name: CI with software token runs-on: ubuntu-22.04 strategy: @@ -82,6 +88,7 @@ jobs: tests/tmp.${{ matrix.token }}/testvars config.log build-macos: + if: ${{ github.event_name != 'labeled' }} name: CI with software token runs-on: ${{ matrix.os }} strategy: diff --git a/.github/workflows/coverity-scan.yml b/.github/workflows/coverity-scan.yml index 96c23e5d..84d41b7e 100644 --- a/.github/workflows/coverity-scan.yml +++ b/.github/workflows/coverity-scan.yml @@ -2,15 +2,16 @@ name: Coverity Scan on: - pull_request_target: + workflow_run: + workflows: [Build] types: - - labeled + - completed schedule: - cron: '41 3 * * 0' jobs: coverity: - if: github.event.label.name == 'covscan' + if: ${{ (contains(github.event.*.labels.*.name, 'covscan') && github.event.workflow_run.conclusion == 'success') || github.event_name == 'schedule' }} name: Coverity Scan runs-on: ubuntu-22.04 container: fedora:latest