From 6f4c9a5317718a8cffc0960f65752b39c8cf966c Mon Sep 17 00:00:00 2001 From: mkorwel Date: Thu, 23 Oct 2025 14:36:29 -0700 Subject: [PATCH] fix(ci): correct workflow variable passing - Adds explicit inputs for variables required by the reusable `build-and-publish` workflow. - Updates the `orchestrator` workflow to pass these variables correctly. - Removes a duplicated job from the `orchestrator` workflow. --- .github/workflows/build-and-publish.yml | 19 ++++++++++++++++--- .github/workflows/orchestrator.yml | 23 ++++++----------------- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 35270c9010..33222cc95d 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -3,6 +3,19 @@ name: 'Build and Publish Bundle' on: workflow_call: + inputs: + cli-package-name: + description: 'The name of the CLI package.' + required: true + type: 'string' + npm-registry-scope: + description: 'NPM registry scope' + required: true + type: 'string' + npm-registry-url: + description: 'NPM registry URL' + required: true + type: 'string' outputs: version: description: 'The version of the published package' @@ -113,9 +126,9 @@ jobs: --file Dockerfile \ --tag "${IMAGE_TAG}" \ --build-arg CLI_VERSION=${{ needs.publish-bundle.outputs.version }} \ - --build-arg NPM_REGISTRY_SCOPE=${{ vars.NPM_REGISTRY_SCOPE }} \ - --build-arg NPM_REGISTRY_URL=${{ vars.NPM_REGISTRY_URL }} \ - --build-arg CLI_PACKAGE_NAME=${{ vars.CLI_PACKAGE_NAME }} \ + --build-arg NPM_REGISTRY_SCOPE=${{ inputs.npm-registry-scope }} \ + --build-arg NPM_REGISTRY_URL=${{ inputs.npm-registry-url }} \ + --build-arg CLI_PACKAGE_NAME=${{ inputs.cli-package-name }} \ --secret id=GITHUB_TOKEN docker push "${IMAGE_TAG}" echo "uri=${IMAGE_TAG}" >> "$GITHUB_OUTPUT" diff --git a/.github/workflows/orchestrator.yml b/.github/workflows/orchestrator.yml index cb0c9f9a55..08bc6496dc 100644 --- a/.github/workflows/orchestrator.yml +++ b/.github/workflows/orchestrator.yml @@ -37,29 +37,18 @@ jobs: name: 'Build and Publish CI Bundle' needs: 'lint' uses: './.github/workflows/build-and-publish.yml' - - ci: - name: 'CI Checks' - needs: 'lint' - uses: './.github/workflows/ci.yml' - - get-vars: - name: 'Get Environment Variables' - runs-on: 'ubuntu-latest' - environment: 'dev' - outputs: - cli-package-name: '${{ steps.get-vars.outputs.cli-package-name }}' - steps: - - id: 'get-vars' - run: 'echo ''cli-package-name=''''${{ vars.CLI_PACKAGE_NAME }}'''''' >> "$GITHUB_OUTPUT"' + with: + cli-package-name: '${{ vars.CLI_PACKAGE_NAME }}' + npm-registry-scope: '${{ vars.NPM_REGISTRY_SCOPE }}' + npm-registry-url: '${{ vars.NPM_REGISTRY_URL }}' e2e: name: 'E2E Checks' - needs: ['build-and-publish', 'get-vars'] + needs: ['build-and-publish'] uses: './.github/workflows/e2e.yml' with: version: '${{ needs.build-and-publish.outputs.version }}' - cli-package-name: '${{ needs.get-vars.outputs.cli-package-name }}' + cli-package-name: '${{ vars.CLI_PACKAGE_NAME }}' image-uri: '${{ needs.build-and-publish.outputs.image-uri }}' secrets: GEMINI_API_KEY: '${{ secrets.GEMINI_API_KEY }}'