From 163057210acedc4e90b9d6f1c2b776e0c63d3d5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Mon, 21 Aug 2023 11:11:13 +0200 Subject: [PATCH] Omit output if empty? --- .github/workflows/R-CMD-check-suggests.yaml | 2 +- .github/workflows/dep-matrix-suggests/action.yml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/R-CMD-check-suggests.yaml b/.github/workflows/R-CMD-check-suggests.yaml index 24479d88cd..274987dff9 100644 --- a/.github/workflows/R-CMD-check-suggests.yaml +++ b/.github/workflows/R-CMD-check-suggests.yaml @@ -64,7 +64,7 @@ jobs: name: ${{ matrix.package }} - if: ${{ matrix.package != '' }} + if: ${{ needs.matrix.outputs.matrix != '' }} # Begin custom: services # End custom: services diff --git a/.github/workflows/dep-matrix-suggests/action.yml b/.github/workflows/dep-matrix-suggests/action.yml index 320f64a8d9..65562b9f5f 100644 --- a/.github/workflows/dep-matrix-suggests/action.yml +++ b/.github/workflows/dep-matrix-suggests/action.yml @@ -34,5 +34,7 @@ runs: ']}' ) writeLines(json) - writeLines(paste0("matrix=", json), Sys.getenv("GITHUB_OUTPUT")) + if (length(packages) > 0) { + writeLines(paste0("matrix=", json), Sys.getenv("GITHUB_OUTPUT")) + } shell: Rscript {0}