diff --git a/.github/workflows/build-browser.yml b/.github/workflows/build-browser.yml index ee3bd20f04..1d42d73e5c 100644 --- a/.github/workflows/build-browser.yml +++ b/.github/workflows/build-browser.yml @@ -319,6 +319,30 @@ jobs: upload_sources: true 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: name: Check for failures @@ -331,6 +355,7 @@ jobs: - build - build-safari - crowdin-push + - trigger-desktop-build steps: - name: Check if any job failed if: ${{ (github.ref == 'refs/heads/master') || (github.ref == 'refs/heads/rc') }} @@ -341,6 +366,7 @@ jobs: BUILD_STATUS: ${{ needs.build.result }} SAFARI_BUILD_STATUS: ${{ needs.build-safari.result }} CROWDIN_PUSH_STATUS: ${{ needs.crowdin-push.result }} + TRIGGER_DESKTOP_BUILD_STATUS: ${{ needs.trigger-desktop-build.result }} run: | if [ "$CLOC_STATUS" = "failure" ]; then exit 1 @@ -354,6 +380,8 @@ jobs: exit 1 elif [ "$CROWDIN_PUSH_STATUS" = "failure" ]; then exit 1 + elif [ "$TRIGGER_DESKTOP_BUILD_STATUS" = "failure" ]; then + exit 1 fi - name: Login to Azure - Prod Subscription