Skip to content

Commit

Permalink
pathogen-repo-ci: Support a continue-on-error pass thru
Browse files Browse the repository at this point in the history
Allows calling workflows to succeed even if the job in this called
workflow fails.  This is a workaround for the calling working being
unable to specify continue-on-error itself.¹

Related-to: <nextstrain/docker-base#148>

¹ <https://docs.github.com/en/actions/using-workflows/reusing-workflows#supported-keywords-for-jobs-that-call-a-reusable-workflow>
  • Loading branch information
tsibley committed May 9, 2023
1 parent c0cffdb commit 9ecc493
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ jobs:
with:
repo: nextstrain/zika-tutorial

test-pathogen-repo-ci-failure:
uses: ./.github/workflows/pathogen-repo-ci.yaml
with:
repo: nextstrain/zika-tutorial
build-args: __BOGUS_BUILD_TARGET__
continue-on-error: true

test-docs-ci-conda:
uses: ./.github/workflows/docs-ci.yaml
with:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/pathogen-repo-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,21 @@ on:
default: ""
required: false

continue-on-error:
description: >-
Pass thru for <https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idcontinue-on-error>.
type: boolean
default: false
required: false

permissions:
contents: read
packages: read

jobs:
build:
runs-on: ubuntu-latest
continue-on-error: ${{ inputs.continue-on-error }}
steps:
# Log in, if possible, to docker.io (Docker Hub), since authenticated
# requests get higher rate limits (e.g. for image pulls). Our org-level
Expand Down

0 comments on commit 9ecc493

Please sign in to comment.