mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 18:08:26 +03:00
Fix version auto bump workflow (#2439)
* Fix verion autobump workflow * Fix * Update .github/workflows/version-auto-bump.yml Co-authored-by: Vince Grassia <593223+vgrassia@users.noreply.github.com> * Update .github/workflows/version-auto-bump.yml Co-authored-by: Vince Grassia <593223+vgrassia@users.noreply.github.com> --------- Co-authored-by: Vince Grassia <593223+vgrassia@users.noreply.github.com>
This commit is contained in:
parent
0462f4db63
commit
11d3d71c32
2 changed files with 13 additions and 24 deletions
30
.github/workflows/version-auto-bump.yml
vendored
30
.github/workflows/version-auto-bump.yml
vendored
|
@ -32,32 +32,14 @@ jobs:
|
|||
echo "new-version=$NEW_VER" >> $GITHUB_OUTPUT
|
||||
|
||||
trigger_version_bump:
|
||||
name: "Trigger version bump workflow"
|
||||
name: "Version bump"
|
||||
runs-on: ubuntu-22.04
|
||||
needs:
|
||||
- setup
|
||||
steps:
|
||||
- name: Login to Azure
|
||||
uses: Azure/login@ec3c14589bd3e9312b3cc8c41e6860e258df9010
|
||||
- name: Bump version to ${{ needs.setup.outputs.version_number }}
|
||||
uses: ./.github/workflows/version-bump.yml
|
||||
secrets:
|
||||
AZURE_PROD_KV_CREDENTIALS: ${{ secrets.AZURE_PROD_KV_CREDENTIALS }}
|
||||
with:
|
||||
creds: ${{ secrets.AZURE_PROD_KV_CREDENTIALS }}
|
||||
|
||||
- name: Retrieve secrets
|
||||
id: retrieve-secrets
|
||||
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:
|
||||
TOKEN: ${{ steps.retrieve-secrets.outputs.github-pat-bitwarden-devops-bot-repo-scope }}
|
||||
VERSION: ${{ needs.setup.outputs.version_number}}
|
||||
run: |
|
||||
JSON_STRING=$(printf '{"ref":"master", "inputs": { "version_number":"%s"}}' "$VERSION")
|
||||
curl \
|
||||
-X POST \
|
||||
-i -u bitwarden-devops-bot:$TOKEN \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
https://api.github.com/repos/bitwarden/mobile/actions/workflows/version-bump.yml/dispatches \
|
||||
-d $JSON_STRING
|
||||
version_number: ${{ needs.setup.outputs.version_number }}
|
||||
|
|
7
.github/workflows/version-bump.yml
vendored
7
.github/workflows/version-bump.yml
vendored
|
@ -7,6 +7,13 @@ on:
|
|||
version_number:
|
||||
description: "New Version"
|
||||
required: true
|
||||
workflow_call:
|
||||
inputs:
|
||||
version_number:
|
||||
required: true
|
||||
secrets:
|
||||
AZURE_PROD_KV_CREDENTIALS:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
bump_version:
|
||||
|
|
Loading…
Reference in a new issue