mirror of
https://github.com/bitwarden/self-host.git
synced 2026-04-18 11:29:29 +00:00
[BRE-1768] Pulling release_version from workflow_dispatch input
This commit is contained in:
14
.github/workflows/release-azure.yml
vendored
14
.github/workflows/release-azure.yml
vendored
@@ -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
|
||||
|
||||
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
@@ -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
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user