Use Dendrite flow to trigger Docker flow for :main

This commit is contained in:
Neil Alexander 2022-03-24 15:06:14 +00:00
parent 10c6d5f634
commit 33076fff79
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -3,11 +3,12 @@
name: "Docker Hub" name: "Docker Hub"
on: on:
release: release: # A GitHub release was published
types: [published] types: [published]
push: workflow_run: # The Dendrite pipeline completed successfully on main
branches: workflows: [Dendrite]
- main types: [completed]
branches: [main]
env: env:
DOCKER_NAMESPACE: matrixdotorg DOCKER_NAMESPACE: matrixdotorg
@ -41,7 +42,9 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Build monolith image - 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 id: docker_build_monolith
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
@ -56,7 +59,7 @@ jobs:
ghcr.io/${{ GHCR_NAMESPACE }}/dendrite-monolith:main ghcr.io/${{ GHCR_NAMESPACE }}/dendrite-monolith:main
- name: Build release monolith image - name: Build release monolith image
if: ${{ github.event_name == 'release' }} if: github.event_name == 'release'
id: docker_build_monolith id: docker_build_monolith
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
@ -97,7 +100,9 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Build polylith image - 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 id: docker_build_polylith
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with: