diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2022-03-25 10:08:13 +0000 |
---|---|---|
committer | Neil Alexander <neilalexander@users.noreply.github.com> | 2022-03-25 10:08:13 +0000 |
commit | 5e780d3ca232af08079c7bebb6166519dda1906c (patch) | |
tree | 2eb6d1f459bed8111fa7b02cfe75cd77ddcd9b59 /.github | |
parent | 87298985a7f94724ab467ab9814bd6c41fcb3027 (diff) |
Chain Docker update onto `main`
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/dendrite.yml | 33 | ||||
-rw-r--r-- | .github/workflows/docker.yml | 17 |
2 files changed, 28 insertions, 22 deletions
diff --git a/.github/workflows/dendrite.yml b/.github/workflows/dendrite.yml index d337865f..715235d3 100644 --- a/.github/workflows/dendrite.yml +++ b/.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 }} @@ -163,7 +163,7 @@ jobs: # Dummy step to gate other tests on without repeating the whole list initial-tests-done: name: Initial tests passed - needs: [ lint, test, build, build_windows ] + needs: [lint, test, build, build_windows] runs-on: ubuntu-latest if: ${{ !cancelled() }} # Run this even if prior jobs were skipped steps: @@ -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: | @@ -232,7 +232,7 @@ jobs: working-directory: /src - name: Summarise results.tap if: ${{ always() }} - run: /sytest/scripts/tap_to_gha.pl /logs/results.tap + run: /sytest/scripts/tap_to_gha.pl /logs/results.tap - name: Upload Sytest logs uses: actions/upload-artifact@v2 @@ -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 diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 5c59a02a..129a8048 100644 --- a/.github/workflows/docker.yml +++ b/.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: |