From c0baeed95db96008d984fc89ebd5cea651f3c923 Mon Sep 17 00:00:00 2001 From: aj-bw <81774843+aj-bw@users.noreply.github.com> Date: Thu, 29 Jan 2026 15:53:57 -0500 Subject: [PATCH] [bre-1525] QA lite environments pulling wrong web artifact (#459) * Fix web artifact download for non-main branches in build-bitwarden-lite workflow * fix linter failure * BRE-1525 - Optimize Logic Changes (#460) --------- Co-authored-by: Vince Grassia <593223+vgrassia@users.noreply.github.com> --- .github/workflows/build-bitwarden-lite.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-bitwarden-lite.yml b/.github/workflows/build-bitwarden-lite.yml index f49df73..51a6027 100644 --- a/.github/workflows/build-bitwarden-lite.yml +++ b/.github/workflows/build-bitwarden-lite.yml @@ -201,26 +201,30 @@ jobs: persist-credentials: false - name: Download web client branch artifacts for dev builds - if: needs.setup.outputs.web_ref == 'refs/heads/main' + if: ${{ !inputs.use_latest_web_version }} uses: bitwarden/gh-actions/download-artifacts@main with: github_token: ${{ steps.app-token.outputs.token }} workflow: build-web.yml workflow_conclusion: success - branch: main + branch: ${{ needs.setup.outputs.web_ref }} repo: bitwarden/clients artifacts: "web-*-selfhosted-DEV.zip" + if_no_artifact_found: fail - name: Set web artifact path for dev builds - if: needs.setup.outputs.web_ref == 'refs/heads/main' + if: ${{ !inputs.use_latest_web_version }} id: set-web-artifact-path + run: echo "path=$(find . -name "web-*-selfhosted-DEV.zip" | head -1)" >> "$GITHUB_OUTPUT" + + - name: Log build configuration + env: + SERVER_REF: ${{ needs.setup.outputs.server_ref }} + WEB_REF: ${{ needs.setup.outputs.web_ref }} run: | - WEB_ARTIFACT=$(find . -name "web-*-selfhosted-DEV.zip" | head -1) - if [[ -z "${WEB_ARTIFACT}" ]]; then - echo "ERROR: No web artifact found for dev build" - exit 1 - fi - echo "path=${WEB_ARTIFACT}" >> "$GITHUB_OUTPUT" + echo "### Build Configuration" >> $GITHUB_STEP_SUMMARY + echo "- Server: ${SERVER_REF}" >> $GITHUB_STEP_SUMMARY + echo "- Web: ${WEB_REF}" >> $GITHUB_STEP_SUMMARY - name: Build and push Docker image id: build-docker