Skip to content

Commit

Permalink
pathogen-repo-ci: Add a "ref" input
Browse files Browse the repository at this point in the history
Handy for running this workflow against non-default refs for testing.
  • Loading branch information
tsibley committed Jun 14, 2024
1 parent 912e9a6 commit e866040
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/pathogen-repo-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ on:
type: string
default: ${{ github.repository }}
required: false
ref:
type: string
default: ""
required: false
env:
description: >-
Additional environment variables to set before the build, as a string containing YAML. This is easily produced, for example, by pretending you're writing normal nested YAML within a literal multi-line block scalar (introduced by "|"):
Expand Down Expand Up @@ -73,6 +77,10 @@ on:
required: false
workflow_dispatch:
inputs:
ref:
type: string
default: ""
required: false
env:
description: >-
Additional environment variables to set before the build, as a string containing YAML. This is easily produced, for example, by pretending you're writing normal nested YAML within a literal multi-line block scalar (introduced by "|"):
Expand Down Expand Up @@ -251,6 +259,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: ${{ inputs.repo }}
ref: ${{ inputs.ref }}
# Need to run this after the build repo is cloned so that cloning the
# build repo does not overwrite the .git dir and remove the extra support files
# that we need from nextstrain/.github repo
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/pathogen-repo-ci.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ on:
default: ${{ github.repository }}
required: false

ref:
type: string
default: ""
required: false

env:
description: >-
Additional environment variables to set before the build, as a string
Expand Down Expand Up @@ -229,6 +234,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: ${{ inputs.repo }}
ref: ${{ inputs.ref }}

# Need to run this after the build repo is cloned so that cloning the
# build repo does not overwrite the .git dir and remove the extra support files
Expand Down

0 comments on commit e866040

Please sign in to comment.