Chain Docker update onto main

This commit is contained in:
Neil Alexander 2022-03-25 10:08:13 +00:00
parent 87298985a7
commit 5e780d3ca2
No known key found for this signature in database
GPG Key ID: A02A2019A2BB0944
2 changed files with 28 additions and 22 deletions

View File

@ -76,7 +76,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
go: [ '1.16', '1.17', '1.18' ] go: ["1.16", "1.17", "1.18"]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Setup go - name: Setup go
@ -101,9 +101,9 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
go: [ '1.16', '1.17', '1.18' ] go: ["1.16", "1.17", "1.18"]
goos: [ 'linux' ] goos: ["linux"]
goarch: [ 'amd64', '386' ] goarch: ["amd64", "386"]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Setup go - name: Setup go
@ -134,9 +134,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
go: [ '1.16', '1.17', '1.18' ] go: ["1.16", "1.17", "1.18"]
goos: [ 'windows' ] goos: ["windows"]
goarch: [ 'amd64' ] goarch: ["amd64"]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Setup Go ${{ matrix.go }} - name: Setup Go ${{ matrix.go }}
@ -183,7 +183,7 @@ jobs:
- name: Setup go - name: Setup go
uses: actions/setup-go@v2 uses: actions/setup-go@v2
with: with:
go-version: '1.16' go-version: "1.16"
- uses: actions/cache@v3 - uses: actions/cache@v3
with: with:
path: | path: |
@ -322,3 +322,16 @@ jobs:
COMPLEMENT_BASE_IMAGE: complement-dendrite:latest COMPLEMENT_BASE_IMAGE: complement-dendrite:latest
API: ${{ matrix.api && 1 }} API: ${{ matrix.api && 1 }}
working-directory: complement 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

View File

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