From e5d5d4fe054e7dc3414d325b2407c6bf5e678434 Mon Sep 17 00:00:00 2001 From: Jover Lee Date: Fri, 21 Jun 2024 12:24:26 -0700 Subject: [PATCH] CI: Verify pathogen-repo-build's aws-batch-job-id output --- .github/workflows/ci.yaml | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c1d1bb2..a0777ab 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -49,7 +49,7 @@ jobs: id-token: write strategy: matrix: - runtime: [docker, conda, aws-batch] + runtime: [docker, conda] uses: ./.github/workflows/pathogen-repo-build.yaml with: repo: nextstrain/zika-tutorial @@ -60,6 +60,37 @@ jobs: BOGUS_ENVVAR: BOGUS_ENVVAR secrets: inherit + # This job has to be separate from the matrix above because we want + # to check the aws-batch-job-id output from the workflow but matrix outputs + # currently will overwrite each other. + # See + test-pathogen-repo-build-aws-batch: + permissions: + id-token: write + uses: ./.github/workflows/pathogen-repo-build.yaml + with: + repo: nextstrain/zika-tutorial + runtime: aws-batch + run: nextstrain build --env BOGUS_ENVVAR . + artifact-name: build-output-aws-batch + env: | + BOGUS_ENVVAR: BOGUS_ENVVAR + secrets: inherit + + test-pathogen-repo-build-aws-batch-id-output: + needs: [test-pathogen-repo-build-aws-batch] + permissions: + id-token: write + uses: ./.github/workflows/pathogen-repo-build.yaml + with: + repo: nextstrain/zika-tutorial + runtime: aws-batch + run: nextstrain build --attach "$AWS_BATCH_JOB_ID" . + artifact-name: build-output-aws-batch-reattached + env: | + AWS_BATCH_JOB_ID: ${{ needs.test-pathogen-repo-build-aws-batch.outputs.aws-batch-job-id }} + secrets: inherit + lint: runs-on: ubuntu-latest steps: