Skip to content

Commit

Permalink
nextstrain-internal: Add docs for automating pathogen workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
joverlee521 committed Jun 14, 2024
1 parent 203a0f3 commit 10f76de
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/nextstrain-internal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ This directory holds documentation that is intended to be used by the internal N

Docs on how the team uses GitHub Action workflows to automate pathogen repos.

- [Automated pathogen workflows](automated-pathogen-workflows.md)
- [Pathogen repo CI](pathogen-repo-ci.md)
30 changes: 30 additions & 0 deletions docs/nextstrain-internal/automated-pathogen-workflows.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Automated pathogen workflows

GitHub Action workflows can be scheduled to run at a specific cadence which is
useful for automating pathogen workflows.

## Using `pathogen-repo-build`

Nextstrain maintains a reusable [pathogen-repo-build][] GH Action workflow that
can be used to set up automated pathogen workflows.

The [pathogen-repo-build][] is very flexible to allow running of a variety of
pathogen workflows. The main input option `run` allows the GH Action workflow
to run any shell command, usually `nextstrain build ...`. See the description
for other input options in the [pathogen-repo-build][] workflow.

### Set up AWS credentials

The [pathogen-repo-build][] is able to automatically generate short-lived AWS
credentials for a [list of supported pathogens][]. Please follow
[instructions in the infra repo][] to add a new pathogen to the list.

Once this is done, the GH Action workflow will have credentials to run `aws s3`
commands within the build runtime for a [specific list of S3 paths for the pathogen][]
and have the option to run jobs using the Nextstrain `aws-batch` runtime.


[instructions in the infra repo]: https://github.com/nextstrain/infra?tab=readme-ov-file#how-to-add-a-new-pathogen-repository-for-use-with-pathogen-repo-build
[list of supported pathogens]: https://github.com/nextstrain/infra/blob/main/env/production/locals.tf
[pathogen-repo-build]: https://github.com/nextstrain/.github/blob/HEAD/.github/workflows/pathogen-repo-build.yaml
[specific list of S3 paths for the pathogen]: https://github.com/nextstrain/infra/blob/main/env/production/aws-iam-policy-NextstrainPathogen%40.tf

0 comments on commit 10f76de

Please sign in to comment.