From 89092f6c755d3e61afe920f674531d294bf22223 Mon Sep 17 00:00:00 2001 From: Thomas Sibley Date: Thu, 13 Jun 2024 22:15:10 -0700 Subject: [PATCH] pathogen-repo-ci: Show pathogen workflow conclusions in the GitHub workflow summary MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A good suggestion by @joverlee521 in review.¹ ¹ --- .github/workflows/pathogen-repo-ci.yaml | 5 ++++- .github/workflows/pathogen-repo-ci.yaml.in | 5 ++++- text-templates/pathogen-repo-ci.md | 5 +++++ 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 text-templates/pathogen-repo-ci.md diff --git a/.github/workflows/pathogen-repo-ci.yaml b/.github/workflows/pathogen-repo-ci.yaml index 4e7c99e..64cee30 100644 --- a/.github/workflows/pathogen-repo-ci.yaml +++ b/.github/workflows/pathogen-repo-ci.yaml @@ -324,11 +324,14 @@ jobs: phylogenetic: ${{ steps.phylogenetic.conclusion }} nextclade: ${{ steps.nextclade.conclusion }} run: | - # Show step conclusions. + # Show step conclusions in job logs… echo "ingest $ingest" echo "phylogenetic $phylogenetic" echo "nextclade $nextclade" + # …and also in the workflow summary. + "$NEXTSTRAIN_GITHUB_DIR"/bin/interpolate-env < "$NEXTSTRAIN_GITHUB_DIR"/text-templates/pathogen-repo-ci.md > "$GITHUB_STEP_SUMMARY" + # Assert status; if we see at least one attempt, regardless of # success/failure, we're good. [[ $ingest != skipped || $phylogenetic != skipped || $nextclade != skipped ]] diff --git a/.github/workflows/pathogen-repo-ci.yaml.in b/.github/workflows/pathogen-repo-ci.yaml.in index f2c0d09..29b2483 100644 --- a/.github/workflows/pathogen-repo-ci.yaml.in +++ b/.github/workflows/pathogen-repo-ci.yaml.in @@ -305,11 +305,14 @@ jobs: phylogenetic: ${{ steps.phylogenetic.conclusion }} nextclade: ${{ steps.nextclade.conclusion }} run: | - # Show step conclusions. + # Show step conclusions in job logs… echo "ingest $ingest" echo "phylogenetic $phylogenetic" echo "nextclade $nextclade" + # …and also in the workflow summary. + "$NEXTSTRAIN_GITHUB_DIR"/bin/interpolate-env < "$NEXTSTRAIN_GITHUB_DIR"/text-templates/pathogen-repo-ci.md > "$GITHUB_STEP_SUMMARY" + # Assert status; if we see at least one attempt, regardless of # success/failure, we're good. [[ $ingest != skipped || $phylogenetic != skipped || $nextclade != skipped ]] diff --git a/text-templates/pathogen-repo-ci.md b/text-templates/pathogen-repo-ci.md new file mode 100644 index 0000000..36af39e --- /dev/null +++ b/text-templates/pathogen-repo-ci.md @@ -0,0 +1,5 @@ +| workflow | conclusion | +| ------------- | --------------- | +| ingest | ${ingest} | +| phylogenetic | ${phylogenetic} | +| nextclade | ${nextclade} |