From 95d4f499a6b62499133ef67485b7a3dd420b69d4 Mon Sep 17 00:00:00 2001 From: Jover Lee Date: Thu, 11 Apr 2024 17:14:54 -0700 Subject: [PATCH] wip: split out ingest --- .github/workflows/ingest-to-phylogenetic.yaml | 24 +--------- .github/workflows/ingest.yaml | 47 +++++++++++++++++++ 2 files changed, 49 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/ingest.yaml diff --git a/.github/workflows/ingest-to-phylogenetic.yaml b/.github/workflows/ingest-to-phylogenetic.yaml index 690e4f3..8b41b6d 100644 --- a/.github/workflows/ingest-to-phylogenetic.yaml +++ b/.github/workflows/ingest-to-phylogenetic.yaml @@ -42,30 +42,10 @@ jobs: ingest: permissions: id-token: write - uses: nextstrain/.github/.github/workflows/pathogen-repo-build.yaml@master + uses: ./.github/workflows/ingest.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.ingest_image }} - run: | - nextstrain build \ - --env AWS_ACCESS_KEY_ID \ - --env AWS_SECRET_ACCESS_KEY \ - ingest \ - upload_all \ - --configfile build-configs/nextstrain-automation/config.yaml - # Specifying artifact name to differentiate ingest build outputs from - # the phylogenetic build outputs - artifact-name: ingest-build-output - artifact-paths: | - ingest/results/ - ingest/benchmarks/ - ingest/logs/ - ingest/.snakemake/log/ + image: ${{ inputs.ingest_image }} # Check if ingest results include new data by checking for the cache # of the file with the results' Metadata.sh256sum (which should have been added within upload-to-s3) diff --git a/.github/workflows/ingest.yaml b/.github/workflows/ingest.yaml new file mode 100644 index 0000000..99dfd74 --- /dev/null +++ b/.github/workflows/ingest.yaml @@ -0,0 +1,47 @@ +name: Ingest + +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 ingest workflow (will override the default of "nextstrain build")' + required: false + type: string + +jobs: + ingest: + 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 \ + ingest \ + upload_all \ + --configfile build-configs/nextstrain-automation/config.yaml + # Specifying artifact name to differentiate ingest build outputs from + # the phylogenetic build outputs + artifact-name: ingest-build-output + artifact-paths: | + ingest/results/ + ingest/benchmarks/ + ingest/logs/ + ingest/.snakemake/log/