From 1c51da1b9f8b0ddee77e894c0665f90316bacad9 Mon Sep 17 00:00:00 2001 From: Mo Beigi Date: Fri, 16 Aug 2024 00:23:01 +1000 Subject: [PATCH] Update workflow to support parallel deploys for server + app --- .github/workflows/mobeigi.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/mobeigi.yml b/.github/workflows/mobeigi.yml index e41b23b9..6aeb422f 100644 --- a/.github/workflows/mobeigi.yml +++ b/.github/workflows/mobeigi.yml @@ -64,8 +64,22 @@ jobs: needs: [ build_test_app, build_test_server ] if: github.event_name == 'push' && github.ref == 'refs/heads/master' steps: - - name: Deploy via webhook - uses: distributhor/workflow-webhook@v1 - env: + - name: Deploy App (via webhook) + uses: distributhor/workflow-webhook@v2 + with: + webhook_url: ${{ secrets.WEBHOOK_URL }} + webhook_secret: ${{ secrets.WEBHOOK_SECRET }} + data: '{ + "DOCKER_COMPOSE_PROJECT_NAME": "${{ vars.APP_DOCKER_COMPOSE_PROJECT_NAME }}", + "GIT_REPOSITORY_NAME": "${{ vars.GIT_REPOSITORY_NAME }}" + }' + + - name: Deploy Server (via webhook) + uses: distributhor/workflow-webhook@v2 + with: webhook_url: ${{ secrets.WEBHOOK_URL }} webhook_secret: ${{ secrets.WEBHOOK_SECRET }} + data: '{ + "DOCKER_COMPOSE_PROJECT_NAME": "${{ vars.SERVER_DOCKER_COMPOSE_PROJECT_NAME }}", + "GIT_REPOSITORY_NAME": "${{ vars.GIT_REPOSITORY_NAME }}" + }'