mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-26 12:25:20 +01:00
[DEVOPS-1014] Fix desktop autobump workflow (#3736)
* Fix desktop autobump workflow * Fix desktop autobump workflow accoring to vince suggestions in mobile * Update ubuntu version
This commit is contained in:
parent
9578e7b6b4
commit
c8e4f88379
30
.github/workflows/version-auto-bump.yml
vendored
30
.github/workflows/version-auto-bump.yml
vendored
@ -12,7 +12,7 @@ defaults:
|
|||||||
jobs:
|
jobs:
|
||||||
setup:
|
setup:
|
||||||
name: "Setup"
|
name: "Setup"
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
outputs:
|
outputs:
|
||||||
version_number: ${{ steps.version.outputs.new-version }}
|
version_number: ${{ steps.version.outputs.new-version }}
|
||||||
if: contains(github.event.release.tag, 'desktop')
|
if: contains(github.event.release.tag, 'desktop')
|
||||||
@ -20,22 +20,23 @@ jobs:
|
|||||||
- name: Checkout Branch
|
- name: Checkout Branch
|
||||||
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
|
||||||
|
|
||||||
- name: Get version to bump
|
- name: Calculate bumped version
|
||||||
id: version
|
id: version
|
||||||
env:
|
env:
|
||||||
RELEASE_TAG: ${{ github.event.release.tag }}
|
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
||||||
run: |
|
run: |
|
||||||
|
CURR_MAJOR=$(echo $RELEASE_TAG | sed -r 's/v([0-9]{4}\.[0-9]{1,2})\.([0-9]{1,2})/\1/')
|
||||||
|
CURR_PATCH=$(echo $RELEASE_TAG | sed -r 's/v([0-9]{4}\.[0-9]{1,2})\.([0-9]{1,2})/\2/')
|
||||||
|
echo "Current Patch: $CURR_PATCH"
|
||||||
|
|
||||||
CURR_MAJOR=$(echo $RELEASE_TAG | sed -r 's/desktop-v([0-9]{4}\.[0-9]\.)([0-9])/\1/')
|
NEW_PATCH=$((CURR_PATCH++))
|
||||||
CURR_VER=$(echo $RELEASE_TAG | sed -r 's/desktop-v([0-9]{4}\.[0-9]\.)([0-9])/\2/')
|
NEW_VER=$CURR_MAJOR.$NEW_PATCH
|
||||||
echo $CURR_VER
|
echo "New Version: $NEW_VER"
|
||||||
((CURR_VER++))
|
|
||||||
NEW_VER=$CURR_MAJOR$CURR_VER
|
|
||||||
echo "::set-output name=new-version::$NEW_VER"
|
echo "::set-output name=new-version::$NEW_VER"
|
||||||
|
|
||||||
trigger_version_bump:
|
trigger_version_bump:
|
||||||
name: "Trigger desktop version bump workflow"
|
name: "Trigger desktop version bump workflow"
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
needs:
|
needs:
|
||||||
- setup
|
- setup
|
||||||
steps:
|
steps:
|
||||||
@ -46,13 +47,10 @@ jobs:
|
|||||||
|
|
||||||
- name: Retrieve secrets
|
- name: Retrieve secrets
|
||||||
id: retrieve-secrets
|
id: retrieve-secrets
|
||||||
env:
|
uses: bitwarden/gh-actions/get-keyvault-secrets@c3b3285993151c5af47cefcb3b9134c28ab479af
|
||||||
KEYVAULT: bitwarden-prod-kv
|
with:
|
||||||
SECRET: "github-pat-bitwarden-devops-bot-repo-scope"
|
keyvault: "bitwarden-prod-kv"
|
||||||
run: |
|
secrets: "github-pat-bitwarden-devops-bot-repo-scope"
|
||||||
VALUE=$(az keyvault secret show --vault-name $KEYVAULT --name $SECRET --query value --output tsv)
|
|
||||||
echo "::add-mask::$VALUE"
|
|
||||||
echo "::set-output name=$SECRET::$VALUE"
|
|
||||||
|
|
||||||
- name: Call GitHub API to trigger workflow bump
|
- name: Call GitHub API to trigger workflow bump
|
||||||
env:
|
env:
|
||||||
|
Loading…
Reference in New Issue
Block a user