Skip to content

Commit

Permalink
Merge pull request #165 from nextstrain/upload-trigger-matrix
Browse files Browse the repository at this point in the history
Upload trigger matrix
  • Loading branch information
joverlee521 authored May 14, 2024
2 parents dfa79c9 + 065915e commit 08d2c1b
Showing 1 changed file with 29 additions and 34 deletions.
63 changes: 29 additions & 34 deletions .github/workflows/upload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,15 @@ on:
description: "Specific container image to use for nextflu-private group builds"
required: false
type: string

triggerNextclade:
description: "Trigger run-nextclade workflow"
required: true
type: boolean
nextcladeDockerImage:
description: "Specific container image to use for the Nextclade workflow"
required: false
type: string

jobs:
upload:
permissions:
Expand All @@ -51,44 +59,31 @@ jobs:
upload_all_metadata \
--configfile profiles/upload.yaml
trigger-public-builds:
needs: [upload]
if: ${{ inputs.triggerPublic }}
runs-on: ubuntu-latest
steps:
- name: Trigger Nextstrain public builds
run: |
gh workflow run \
run-public-builds.yaml \
--repo nextstrain/seasonal-flu \
-f dockerImage=${{ github.event.inputs.publicDockerImage }}
env:
GITHUB_TOKEN: ${{ github.token }}

trigger-private-nextflu-builds:
needs: [upload]
if: ${{ inputs.triggerPrivateNextflu }}
runs-on: ubuntu-latest
steps:
- name: Trigger private Nextflu builds
run: |
gh workflow run \
run-private-nextflu-builds.yaml \
--repo nextstrain/seasonal-flu \
-f dockerImage=${{ github.event.inputs.privateNextfluDockerImage }}
env:
GITHUB_TOKEN: ${{ github.token }}

trigger-nextflu-private-builds:
trigger:
needs: [upload]
if: ${{ inputs.triggerNextfluPrivate }}
strategy:
matrix:
include:
- trigger: ${{ inputs.triggerPublic }}
workflow: run-public-builds.yaml
image: ${{ inputs.publicDockerImage }}
- trigger: ${{ inputs.triggerPrivateNextflu }}
workflow: run-private-nextflu-builds.yaml
image: ${{ inputs.privateNextfluDockerImage }}
- trigger: ${{ inputs.triggerNextfluPrivate }}
workflow: run-nextflu-private-builds.yaml
image: ${{ inputs.nextfluPrivateDockerImage }}
- trigger: ${{ inputs.triggerNextclade }}
workflow: run-nextclade.yaml
image: ${{ inputs.nextcladeDockerImage }}
runs-on: ubuntu-latest
steps:
- name: Trigger nextflu-private group builds
- if: ${{ matrix.trigger }}
name: Trigger ${{ matrix.workflow }}
run: |
gh workflow run \
run-nextflu-private-builds.yaml \
${{ matrix.workflow }} \
--repo nextstrain/seasonal-flu \
-f dockerImage=${{ github.event.inputs.nextfluPrivateDockerImage }}
-f dockerImage=${{ matrix.image }}
env:
GITHUB_TOKEN: ${{ github.token }}

0 comments on commit 08d2c1b

Please sign in to comment.