Skip to content

Commit

Permalink
Add GH Action workflow for phylogenetic
Browse files Browse the repository at this point in the history
Mainly adding to test out changes in previous commit, but nice to have
for any future testing needed.
  • Loading branch information
joverlee521 committed Apr 12, 2024
1 parent 4226f0c commit 5c85067
Showing 1 changed file with 74 additions and 0 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/phylogenetic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Phylogenetic

defaults:
run:
# This is the same as GitHub Action's `bash` keyword as of 20 June 2023:
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell
#
# Completely spelling it out here so that GitHub can't change it out from under us
# and we don't have to refer to the docs to know the expected behavior.
shell: bash --noprofile --norc -eo pipefail {0}

on:
workflow_dispatch:
inputs:
image:
description: 'Specific container image to use for phylogenetic workflow (will override the default of "nextstrain build")'
required: false
trial_name:
description: |
Trial name for deploying builds.
If not set, will overwrite builds at s3://nextstrain-data.
If set, builds will be deployed to s3://nextstrain-staging/dengue/<trial_name>
required: false

jobs:
set_config_overrides:
runs-on: ubuntu-latest
steps:
- id: config
name: Set config overrides
env:
TRIAL_NAME: ${{ inputs.trial_name }}
run: |
config=""
if [[ "$TRIAL_NAME" ]]; then
config+="--config "
config+="deploy_url='s3://nextstrain-staging/dengue_trial_"$TRIAL_NAME"_'"
fi
echo "config=$config" >> "$GITHUB_OUTPUT"
outputs:
config_overrides: ${{ steps.config.outputs.config }}

phylogenetic:
needs: [set_config_overrides]
permissions:
id-token: write
uses: nextstrain/.github/.github/workflows/pathogen-repo-build.yaml@master
secrets: inherit
with:
# Starting with the default docker runtime
# We can migrate to AWS Batch when/if we need to for more resources or if
# the job runs longer than the GH Action limit of 6 hours.
runtime: docker
env: |
NEXTSTRAIN_DOCKER_IMAGE: ${{ inputs.image }}
CONFIG_OVERRIDES: ${{ needs.set_config_overrides.outputs.config_overrides }}
run: |
nextstrain build \
--env AWS_ACCESS_KEY_ID \
--env AWS_SECRET_ACCESS_KEY \
phylogenetic \
deploy_all \
--configfile build-configs/nextstrain-automation/config.yaml \
$CONFIG_OVERRIDES
# Specifying artifact name to differentiate ingest build outputs from
# the phylogenetic build outputs
artifact-name: phylogenetic-build-output
artifact-paths: |
phylogenetic/auspice/
phylogenetic/results/
phylogenetic/benchmarks/
phylogenetic/logs/
phylogenetic/.snakemake/log/

0 comments on commit 5c85067

Please sign in to comment.