Chain Docker update onto `main`
MODIFY
.github/workflows/dendrite.yml
.github/workflows/dendrite.yml
@@ -76,7 +76,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- go: [ '1.16', '1.17', '1.18' ]
+ go: ["1.16", "1.17", "1.18"]
steps:
- uses: actions/checkout@v3
- name: Setup go
@@ -101,9 +101,9 @@ jobs:
strategy:
fail-fast: false
matrix:
- go: [ '1.16', '1.17', '1.18' ]
- goos: [ 'linux' ]
- goarch: [ 'amd64', '386' ]
+ go: ["1.16", "1.17", "1.18"]
+ goos: ["linux"]
+ goarch: ["amd64", "386"]
steps:
- uses: actions/checkout@v3
- name: Setup go
@@ -134,9 +134,9 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- go: [ '1.16', '1.17', '1.18' ]
- goos: [ 'windows' ]
- goarch: [ 'amd64' ]
+ go: ["1.16", "1.17", "1.18"]
+ goos: ["windows"]
+ goarch: ["amd64"]
steps:
- uses: actions/checkout@v3
- name: Setup Go ${{ matrix.go }}
@@ -183,7 +183,7 @@ jobs:
- name: Setup go
uses: actions/setup-go@v2
with:
- go-version: '1.16'
+ go-version: "1.16"
- uses: actions/cache@v3
with:
path: |
@@ -322,3 +322,16 @@ jobs:
COMPLEMENT_BASE_IMAGE: complement-dendrite:latest
API: ${{ matrix.api && 1 }}
working-directory: complement
+
+ update-docker-images:
+ name: Update Docker images
+ if: github.repository == 'matrix-org/dendrite' && github.ref_name == 'main'
+ needs: [initial-tests-done, upgrade_test, sytest, complement]
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check integration tests passed
+ uses: re-actors/alls-green@release/v1
+ with:
+ jobs: ${{ toJSON(needs) }}
+ - name: Dispatch Docker build
+ uses: ./.github/workflows/dendrite.yml

MODIFY
.github/workflows/docker.yml
.github/workflows/docker.yml
@@ -5,11 +5,8 @@ name: "Docker"
on:
release: # A GitHub release was published
types: [published]
- #workflow_run: # The Dendrite pipeline completed successfully on main
- # workflows: [Dendrite]
- # types: [completed]
- # branches: [main]
workflow_dispatch: # A build was manually requested
+ workflow_call: # Another pipeline called us
env:
DOCKER_NAMESPACE: matrixdotorg
@@ -46,10 +43,8 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- - name: Build monolith image
- if: >-
- (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') ||
- github.event_name == 'workflow_dispatch'
+ - name: Build main monolith image
+ if: github.ref_name == 'main'
id: docker_build_monolith
uses: docker/build-push-action@v2
with:
@@ -108,10 +103,8 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- - name: Build polylith image
- if: >-
- (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') ||
- github.event_name == 'workflow_dispatch'
+ - name: Build main polylith image
+ if: github.ref_name == 'main'
id: docker_build_polylith
uses: docker/build-push-action@v2
with:

Chain Docker update onto `main`