Skip to content

Commit

Permalink
Restore artifact-name functionality, per PR feedback [#89]
Browse files Browse the repository at this point in the history
* Update `artifact-name` description in `pathogen-repo-ci.yaml` to
  make it clear build directory will be appended to provided value,
  and to update default value to make clear these are CI results
* Pass `artifact-name` down into `run-nextstrain-ci-build` steps ni
  `pathogen-repo-ci` workflow
* Add `artifact-name` input to `run-nextstrain-ci-build` action and
  use it in `upload-artifact` action step
  • Loading branch information
genehack committed Jun 7, 2024
1 parent 46abc25 commit 3b49692
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/pathogen-repo-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,20 @@ on:

artifact-name:
description: >-
Name to use for build results artifact uploaded at the end of the
workflow. This name will be suffixed with other information from the
workflow job matrix to distinguish each artifact in a workflow run.
A base name to use for the uploaded artifacts from the
build. This will be concatenated with the directory name
used to invoke the build to generate the full artifact file
name.
If you're invoking this workflow multiple times from the same calling
workflow, you should set this. Otherwise, the default of "outputs"
is probably fine.
Defaults to `ci-outputs`.
N.b., you almost certainly don't need to change this, unless
you're running multiple invocations of this action in a
single workflow. Then you should provide unique values to
ensure you can access the artifacts from all the builds
you're doing.
type: string
default: outputs
default: ci-outputs
required: false

continue-on-error:
Expand Down Expand Up @@ -244,15 +249,18 @@ jobs:
with:
directory: ingest
runtime: ${{ matrix.runtime }}
artifact-name: ${{ inputs.artifact-name }}

- name: Run phylogenetic
uses: ./.git/nextstrain/.github/actions/run-nextstrain-ci-build
with:
directory: phylogenetic
runtime: ${{ matrix.runtime }}
artifact-name: ${{ inputs.artifact-name }}

- name: Run nextclade
uses: ./.git/nextstrain/.github/actions/run-nextstrain-ci-build
with:
directory: nextclade
runtime: ${{ matrix.runtime }}
artifact-name: ${{ inputs.artifact-name }}
8 changes: 7 additions & 1 deletion actions/run-nextstrain-ci-build/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ description: >-
the context of that specific workflow.
inputs:
artifact-name:
description: >-
Name to append to the build directory to generate a
unique artifact name for the upload action.
type: string
required: true
directory:
description: The name of the sub-directory to run the build from
type: string
Expand Down Expand Up @@ -42,7 +48,7 @@ runs:
if: always()
uses: actions/upload-artifact@v4
with:
name: ci-outputs-${{ inputs.directory }}-${{ inputs.runtime }}
name: ${{ inputs.artifact-name }}-${{ inputs.directory }}-${{ inputs.runtime }}
if-no-files-found: ignore
path: |
${{ inputs.directory }}/.snakemake/log/
Expand Down

0 comments on commit 3b49692

Please sign in to comment.