mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 08:43:33 +00:00
Add trigger step for desktop build
This commit is contained in:
28
.github/workflows/build-browser.yml
vendored
28
.github/workflows/build-browser.yml
vendored
@@ -319,6 +319,30 @@ jobs:
|
|||||||
upload_sources: true
|
upload_sources: true
|
||||||
upload_translations: false
|
upload_translations: false
|
||||||
|
|
||||||
|
trigger-desktop-build:
|
||||||
|
name: Crowdin Push
|
||||||
|
if: ${{ (github.ref == 'refs/heads/master') || (github.ref == 'refs/heads/rc') || contains(github.ref, 'hotfix-rc') }}
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
needs:
|
||||||
|
- build
|
||||||
|
- build-safari
|
||||||
|
steps:
|
||||||
|
- name: Extract branch name
|
||||||
|
id: extract_branch
|
||||||
|
shell: bash
|
||||||
|
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
|
||||||
|
|
||||||
|
- name: Call GitHub API to trigger desktop build workflow
|
||||||
|
env:
|
||||||
|
TOKEN: ${{ secrets.TOKEN }} # replace this yalue with actual token secret name
|
||||||
|
BRANCH_NAME: ${{ steps.extract_branch.outputs.branch }}
|
||||||
|
run: |
|
||||||
|
curl \
|
||||||
|
-X POST \
|
||||||
|
-i -u bitwarden-devops-bot:$TOKEN \
|
||||||
|
-H "Accept: application/vnd.github.v3+json" \
|
||||||
|
https://api.github.com/repos/bitwarden/clients/actions/workflows/build-desktop.yml/dispatches \
|
||||||
|
-d '{"ref":"$BRANCH_NAME"}'
|
||||||
|
|
||||||
check-failures:
|
check-failures:
|
||||||
name: Check for failures
|
name: Check for failures
|
||||||
@@ -331,6 +355,7 @@ jobs:
|
|||||||
- build
|
- build
|
||||||
- build-safari
|
- build-safari
|
||||||
- crowdin-push
|
- crowdin-push
|
||||||
|
- trigger-desktop-build
|
||||||
steps:
|
steps:
|
||||||
- name: Check if any job failed
|
- name: Check if any job failed
|
||||||
if: ${{ (github.ref == 'refs/heads/master') || (github.ref == 'refs/heads/rc') }}
|
if: ${{ (github.ref == 'refs/heads/master') || (github.ref == 'refs/heads/rc') }}
|
||||||
@@ -341,6 +366,7 @@ jobs:
|
|||||||
BUILD_STATUS: ${{ needs.build.result }}
|
BUILD_STATUS: ${{ needs.build.result }}
|
||||||
SAFARI_BUILD_STATUS: ${{ needs.build-safari.result }}
|
SAFARI_BUILD_STATUS: ${{ needs.build-safari.result }}
|
||||||
CROWDIN_PUSH_STATUS: ${{ needs.crowdin-push.result }}
|
CROWDIN_PUSH_STATUS: ${{ needs.crowdin-push.result }}
|
||||||
|
TRIGGER_DESKTOP_BUILD_STATUS: ${{ needs.trigger-desktop-build.result }}
|
||||||
run: |
|
run: |
|
||||||
if [ "$CLOC_STATUS" = "failure" ]; then
|
if [ "$CLOC_STATUS" = "failure" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
@@ -354,6 +380,8 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
elif [ "$CROWDIN_PUSH_STATUS" = "failure" ]; then
|
elif [ "$CROWDIN_PUSH_STATUS" = "failure" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
|
elif [ "$TRIGGER_DESKTOP_BUILD_STATUS" = "failure" ]; then
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Login to Azure - Prod Subscription
|
- name: Login to Azure - Prod Subscription
|
||||||
|
|||||||
Reference in New Issue
Block a user