From 33076fff796780026ca8b2b41952dcc2da4e0671 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Thu, 24 Mar 2022 15:06:14 +0000 Subject: [PATCH] Use Dendrite flow to trigger Docker flow for `:main` --- .github/workflows/docker.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index fe9f2042e..cf3919233 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -3,11 +3,12 @@ name: "Docker Hub" on: - release: + release: # A GitHub release was published types: [published] - push: - branches: - - main + workflow_run: # The Dendrite pipeline completed successfully on main + workflows: [Dendrite] + types: [completed] + branches: [main] env: DOCKER_NAMESPACE: matrixdotorg @@ -41,7 +42,9 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build monolith image - if: ${{ github.event_name == 'push' }} + if: >- + github.event_name == 'workflow_run' && + github.event.workflow_run.conclusion == 'success' id: docker_build_monolith uses: docker/build-push-action@v2 with: @@ -56,7 +59,7 @@ jobs: ghcr.io/${{ GHCR_NAMESPACE }}/dendrite-monolith:main - name: Build release monolith image - if: ${{ github.event_name == 'release' }} + if: github.event_name == 'release' id: docker_build_monolith uses: docker/build-push-action@v2 with: @@ -97,7 +100,9 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build polylith image - if: ${{ github.event_name == 'push' }} + if: >- + github.event_name == 'workflow_run' && + github.event.workflow_run.conclusion == 'success' id: docker_build_polylith uses: docker/build-push-action@v2 with: