From 2aa21a6f5f9e05c1a3e4a44940b88ecafa32c96f Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Mon, 25 Sep 2023 20:15:42 +0200 Subject: [PATCH 1/2] feat(pathogen-repo-ci): allow configuration of workflow root --- .github/workflows/pathogen-repo-ci.yaml | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pathogen-repo-ci.yaml b/.github/workflows/pathogen-repo-ci.yaml index 89dba83..c3fe7a9 100644 --- a/.github/workflows/pathogen-repo-ci.yaml +++ b/.github/workflows/pathogen-repo-ci.yaml @@ -63,6 +63,14 @@ on: - conda required: false + workflow-root: + description: >- + Path to the root of the Snakemake workflow filder to run CI on. + Defaults to the root of the workflow repo. + type: string + default: ${{ github.workspace }} + required: false + artifact-name: description: >- Name to use for build results artifact uploaded at the end of the @@ -228,6 +236,7 @@ jobs: python-version: "3.7" - name: Copy example data + working-directory: ${{ inputs.workflow-root }} run: | if [[ -d example_data ]]; then mkdir -p data/ @@ -237,14 +246,17 @@ jobs: fi - run: nextstrain build . ${{ inputs.build-args }} + working-directory: ${{ inputs.workflow-root }} - if: always() uses: actions/upload-artifact@v3 + env: + workdir: ${{ inputs.workflow-root }} with: name: ${{ inputs.artifact-name }}-${{ matrix.runtime }} path: | - auspice/ - results/ - benchmarks/ - logs/ - .snakemake/log/ + $workdir/auspice/ + $workdir/results/ + $workdir/benchmarks/ + $workdir/logs/ + $workdir/.snakemake/log/ From dec0880059017dac7facf100435c5737bf1386c8 Mon Sep 17 00:00:00 2001 From: Cornelius Roemer Date: Mon, 25 Sep 2023 20:55:23 +0200 Subject: [PATCH 2/2] Update .github/workflows/pathogen-repo-ci.yaml Co-authored-by: Victor Lin <13424970+victorlin@users.noreply.github.com> --- .github/workflows/pathogen-repo-ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pathogen-repo-ci.yaml b/.github/workflows/pathogen-repo-ci.yaml index c3fe7a9..60fd2ab 100644 --- a/.github/workflows/pathogen-repo-ci.yaml +++ b/.github/workflows/pathogen-repo-ci.yaml @@ -65,7 +65,7 @@ on: workflow-root: description: >- - Path to the root of the Snakemake workflow filder to run CI on. + Path to the root of the workflow folder (e.g. one that contains a Snakefile) to run CI on. Defaults to the root of the workflow repo. type: string default: ${{ github.workspace }}