mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-03 12:13:09 -06:00
Build current images on :main tag
This commit is contained in:
parent
9e546d75dc
commit
10c6d5f634
45
.github/workflows/docker.yml
vendored
45
.github/workflows/docker.yml
vendored
|
|
@ -5,6 +5,9 @@ name: "Docker Hub"
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [published]
|
types: [published]
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOCKER_NAMESPACE: matrixdotorg
|
DOCKER_NAMESPACE: matrixdotorg
|
||||||
|
|
@ -13,7 +16,8 @@ env:
|
||||||
PLATFORMS: linux/amd64,linux/arm64,linux/arm/v7
|
PLATFORMS: linux/amd64,linux/arm64,linux/arm/v7
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Monolith:
|
monolith:
|
||||||
|
name: Monolith image
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|
@ -37,9 +41,27 @@ jobs:
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build monolith image
|
- name: Build monolith image
|
||||||
|
if: ${{ github.event_name == 'push' }}
|
||||||
id: docker_build_monolith
|
id: docker_build_monolith
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
|
context: .
|
||||||
|
file: ./build/docker/Dockerfile.monolith
|
||||||
|
platforms: ${{ env.PLATFORMS }}
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
${{ env.DOCKER_NAMESPACE }}/dendrite-monolith:main
|
||||||
|
ghcr.io/${{ GHCR_NAMESPACE }}/dendrite-monolith:main
|
||||||
|
|
||||||
|
- name: Build release monolith image
|
||||||
|
if: ${{ github.event_name == 'release' }}
|
||||||
|
id: docker_build_monolith
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
context: .
|
context: .
|
||||||
file: ./build/docker/Dockerfile.monolith
|
file: ./build/docker/Dockerfile.monolith
|
||||||
platforms: ${{ env.PLATFORMS }}
|
platforms: ${{ env.PLATFORMS }}
|
||||||
|
|
@ -50,7 +72,8 @@ jobs:
|
||||||
ghcr.io/${{ GHCR_NAMESPACE }}/dendrite-monolith:latest
|
ghcr.io/${{ GHCR_NAMESPACE }}/dendrite-monolith:latest
|
||||||
ghcr.io/${{ GHCR_NAMESPACE }}/dendrite-monolith:${{ env.RELEASE_VERSION }}
|
ghcr.io/${{ GHCR_NAMESPACE }}/dendrite-monolith:${{ env.RELEASE_VERSION }}
|
||||||
|
|
||||||
Polylith:
|
polylith:
|
||||||
|
name: Polylith image
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|
@ -74,9 +97,27 @@ jobs:
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build polylith image
|
- name: Build polylith image
|
||||||
|
if: ${{ github.event_name == 'push' }}
|
||||||
id: docker_build_polylith
|
id: docker_build_polylith
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
|
context: .
|
||||||
|
file: ./build/docker/Dockerfile.polylith
|
||||||
|
platforms: ${{ env.PLATFORMS }}
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
${{ env.DOCKER_NAMESPACE }}/dendrite-polylith:main
|
||||||
|
ghcr.io/${{ GHCR_NAMESPACE }}/dendrite-polylith:main
|
||||||
|
|
||||||
|
- name: Build release polylith image
|
||||||
|
if: ${{ github.event_name == 'release' }}
|
||||||
|
id: docker_build_polylith
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
context: .
|
context: .
|
||||||
file: ./build/docker/Dockerfile.polylith
|
file: ./build/docker/Dockerfile.polylith
|
||||||
platforms: ${{ env.PLATFORMS }}
|
platforms: ${{ env.PLATFORMS }}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue