From 296b38d7121f8155c6b828a91cc2c75684760f05 Mon Sep 17 00:00:00 2001 From: Andy Pixley <3723676+pixman20@users.noreply.github.com> Date: Fri, 12 Dec 2025 18:29:28 -0500 Subject: [PATCH] [BRE-1424] Pass in the GH tag to use for building BW lite --- .github/workflows/build-bitwarden-lite.yml | 10 ++++++++++ .github/workflows/release.yml | 13 ++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-bitwarden-lite.yml b/.github/workflows/build-bitwarden-lite.yml index b9438d6..6a67dc9 100644 --- a/.github/workflows/build-bitwarden-lite.yml +++ b/.github/workflows/build-bitwarden-lite.yml @@ -7,6 +7,10 @@ on: - ".github/workflows/build-bitwarden-lite.yml" workflow_dispatch: inputs: + repo_ref: + description: "Self-host ref to use for checkout (Default: current ref)" + type: string + required: false server_branch: description: "Server branch name (examples: 'main', 'rc', 'feature/sm')" type: string @@ -25,6 +29,10 @@ on: default: false workflow_call: inputs: + repo_ref: + description: "Self-host ref to use for checkout (Default: current ref)" + type: string + required: false server_branch: description: "Server branch name (examples: 'main', 'rc', 'feature/sm')" type: string @@ -64,6 +72,7 @@ jobs: - name: Checkout Repository uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: + ref: ${{ inputs.repo_ref || github.ref }} persist-credentials: false - name: Set Server variables @@ -113,6 +122,7 @@ jobs: - name: Checkout Repository uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: + ref: ${{ inputs.repo_ref || github.ref }} persist-credentials: false - name: Set up QEMU emulators diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 55588ce..40c9ffb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -87,7 +87,7 @@ jobs: app-id: ${{ steps.get-kv-secrets.outputs.BW-GHAPP-ID }} private-key: ${{ steps.get-kv-secrets.outputs.BW-GHAPP-KEY }} permission-contents: write # for pushing commits - + - name: Checkout Branch uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: @@ -102,13 +102,13 @@ jobs: repository: bitwarden/server trim: true - - name: Update Core version + - name: Update Core version id: update-core-version env: NEW_VERSION: ${{ steps.get-core.outputs.version }} run: | OLD_VERSION=$(jq -r '.versions.coreVersion' version.json) - + sed -i -e "/^\s*COREVERSION\s*=\s*/s/[0-9]\+.[0-9]\+.[0-9]\+/$NEW_VERSION/" bitwarden.sh sed -i -e "/^\s*\$coreVersion\s*=\s*/s/[0-9]\+.[0-9]\+.[0-9]\+/$NEW_VERSION/" bitwarden.ps1 sed -i -e '/"coreVersion":/ s/"coreVersion":[^,]*/"coreVersion":"'$NEW_VERSION'"/' version.json @@ -417,13 +417,16 @@ jobs: build-lite-image: name: Build Bitwarden lite image uses: ./.github/workflows/build-bitwarden-lite.yml - needs: update-versions + needs: + - update-versions + - release-github permissions: contents: read id-token: write packages: write security-events: write with: + repo_ref: "v${{ inputs.release_version }}" use_latest_core_version: true use_latest_web_version: true secrets: inherit @@ -576,6 +579,6 @@ jobs: owner: 'bitwarden', repo: 'self-host', workflow_id: 'release-digital-ocean.yml', - ref: 'main', + ref: 'v${{ inputs.release_version_}}', inputs: {} });