[BRE-1768] Pulling release_version from workflow_dispatch input

This commit is contained in:
Andy Pixley
2026-04-02 20:15:42 -04:00
parent 7702d193f9
commit 101da7e952
2 changed files with 13 additions and 6 deletions

View File

@@ -7,6 +7,10 @@ on:
- "CommonMarketplace/**"
workflow_dispatch:
inputs:
release_version:
description: "Release version (e.g. '2025.2.1'). Leave empty for a dev build."
required: false
concurrency:
group: ${{ github.workflow }}
@@ -53,10 +57,10 @@ jobs:
fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
# Use a dev version for non-release builds to avoid colliding with
# published gallery image versions
if [[ "${{ github.event_name }}" == "release" ]]; then
echo "img_version=$VERSION" >> "$GITHUB_OUTPUT"
# Use inputs.release_version when provided (triggered from release.yml),
# otherwise use a dev version to avoid colliding with published gallery image versions
if [[ -n "${{ inputs.release_version }}" ]]; then
echo "img_version=${{ inputs.release_version }}" >> "$GITHUB_OUTPUT"
else
echo "img_version=0.0.${{ github.run_number }}" >> "$GITHUB_OUTPUT"
fi
@@ -134,7 +138,7 @@ jobs:
- name: Azure Image Cleanup
working-directory: ./AzureMarketplace
if: ${{ github.event_name != 'release' && github.event_name != 'workflow_dispatch' }}
if: ${{ inputs.release_version == '' || inputs.release_version == null }}
env:
RESOURCE_GROUP: rg-marketplace
GALLERY_NAME: bitwarden_marketplace

View File

@@ -525,6 +525,7 @@ jobs:
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
RELEASE_TAG: v${{ inputs.release_version }}
RELEASE_VERSION: ${{ inputs.release_version }}
with:
github-token: ${{ steps.app-token.outputs.token }}
script: |
@@ -533,5 +534,7 @@ jobs:
repo: 'self-host',
workflow_id: 'release-azure.yml',
ref: process.env.RELEASE_TAG,
inputs: {}
inputs: {
release_version: process.env.RELEASE_VERSION
}
});