1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-26 17:08:33 +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:
Michał Chęciński 2022-10-11 16:35:25 +02:00 committed by GitHub
parent 9578e7b6b4
commit c8e4f88379
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,7 +12,7 @@ defaults:
jobs:
setup:
name: "Setup"
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
outputs:
version_number: ${{ steps.version.outputs.new-version }}
if: contains(github.event.release.tag, 'desktop')
@ -20,22 +20,23 @@ jobs:
- name: Checkout Branch
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
- name: Get version to bump
- name: Calculate bumped version
id: version
env:
RELEASE_TAG: ${{ github.event.release.tag }}
RELEASE_TAG: ${{ github.event.release.tag_name }}
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/')
CURR_VER=$(echo $RELEASE_TAG | sed -r 's/desktop-v([0-9]{4}\.[0-9]\.)([0-9])/\2/')
echo $CURR_VER
((CURR_VER++))
NEW_VER=$CURR_MAJOR$CURR_VER
NEW_PATCH=$((CURR_PATCH++))
NEW_VER=$CURR_MAJOR.$NEW_PATCH
echo "New Version: $NEW_VER"
echo "::set-output name=new-version::$NEW_VER"
trigger_version_bump:
name: "Trigger desktop version bump workflow"
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs:
- setup
steps:
@ -46,13 +47,10 @@ jobs:
- name: Retrieve secrets
id: retrieve-secrets
env:
KEYVAULT: bitwarden-prod-kv
SECRET: "github-pat-bitwarden-devops-bot-repo-scope"
run: |
VALUE=$(az keyvault secret show --vault-name $KEYVAULT --name $SECRET --query value --output tsv)
echo "::add-mask::$VALUE"
echo "::set-output name=$SECRET::$VALUE"
uses: bitwarden/gh-actions/get-keyvault-secrets@c3b3285993151c5af47cefcb3b9134c28ab479af
with:
keyvault: "bitwarden-prod-kv"
secrets: "github-pat-bitwarden-devops-bot-repo-scope"
- name: Call GitHub API to trigger workflow bump
env: