Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload trigger matrix #165

Merged
merged 2 commits into from
May 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}