From 7b3cdc7cc92b4ea6c4da7b0f3aa6a95370e27822 Mon Sep 17 00:00:00 2001 From: Jover Lee Date: Thu, 11 Apr 2024 17:17:19 -0700 Subject: [PATCH] wip: split out phylogenetic --- .github/workflows/ingest-to-phylogenetic.yaml | 25 +--------- .github/workflows/phylogenetic.yaml | 48 +++++++++++++++++++ 2 files changed, 50 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/phylogenetic.yaml diff --git a/.github/workflows/ingest-to-phylogenetic.yaml b/.github/workflows/ingest-to-phylogenetic.yaml index 8b41b6d..34db5d6 100644 --- a/.github/workflows/ingest-to-phylogenetic.yaml +++ b/.github/workflows/ingest-to-phylogenetic.yaml @@ -94,28 +94,7 @@ jobs: if: ${{ needs.check-new-data.outputs.cache-hit != 'true' }} permissions: id-token: write - uses: nextstrain/.github/.github/workflows/pathogen-repo-build.yaml@master + uses: ./.github/workflows/phylogenetic.yaml 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.phylogenetic_image }} - run: | - nextstrain build \ - --env AWS_ACCESS_KEY_ID \ - --env AWS_SECRET_ACCESS_KEY \ - phylogenetic \ - deploy_all \ - --configfile build-configs/nextstrain-automation/config.yaml - # 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/ + image: ${{ inputs.phylogenetic_image }} diff --git a/.github/workflows/phylogenetic.yaml b/.github/workflows/phylogenetic.yaml new file mode 100644 index 0000000..f80f578 --- /dev/null +++ b/.github/workflows/phylogenetic.yaml @@ -0,0 +1,48 @@ +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_call: + inputs: + image: + description: 'Specific container image to use for phylogenetic workflow (will override the default of "nextstrain build")' + required: false + type: string + +jobs: + phylogenetic: + 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 }} + run: | + nextstrain build \ + --env AWS_ACCESS_KEY_ID \ + --env AWS_SECRET_ACCESS_KEY \ + phylogenetic \ + deploy_all \ + --configfile build-configs/nextstrain-automation/config.yaml + # 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/