From 3c5b55d7fb9880bec9521cdd775d8948f364f79e Mon Sep 17 00:00:00 2001 From: Adam Hofmann Date: Tue, 23 Feb 2021 12:05:59 -0500 Subject: [PATCH] Resolving workflow status as successful when all jobs are either successful or skipped --- action.yml | 4 ++-- report_github_metrics.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index fb0d4db..1b54cea 100644 --- a/action.yml +++ b/action.yml @@ -14,8 +14,8 @@ runs: - name: Install required libraries for gems shell: bash run: | - gem install octokit - gem install dogapi + gem install octokit --silent + gem install dogapi --silent - name: Export extra data shell: bash run: | diff --git a/report_github_metrics.rb b/report_github_metrics.rb index babb6ce..9dd15a4 100644 --- a/report_github_metrics.rb +++ b/report_github_metrics.rb @@ -21,7 +21,7 @@ def collect_job_metrics(job, tags) def collect_workflow_metrics(jobs, tags) start = jobs.min_by{|job| job["started_at"]}["started_at"] finish = jobs.max_by{|job| job["completed_at"]}["completed_at"] - status = jobs.all?{|job| job["conclusion"] == "success"} ? "success" : "failure" + status = jobs.all?{|job| ["success", "skipped"].include? job["conclusion"]} ? "success" : "failure" [[ "workflow_duration", finish - start,