Skip to content

feat: add enterprise license for MrRobot @ fSociety #18

feat: add enterprise license for MrRobot @ fSociety

feat: add enterprise license for MrRobot @ fSociety #18

name: Server CI Enterprise
on:
workflow_dispatch:
push:
branches:
- release-*
tags:
- v*
concurrency:
group: mattermost-enterprise-linux-${{ github.ref_name }}
cancel-in-progress: true
jobs:
build-server:
runs-on: ubuntu-latest
defaults:
run:
working-directory: server
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: webapp/package-lock.json
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: server/.go-version
cache-dependency-path: |
server/go.mod
server/public/go.sum
- name: Configure Enterprise edition
run: |
mkdir -p ../enterprise-dir/imports ../enterprise-dir/cloud/config
cp enterprise/placeholder.go ../enterprise-dir/imports/imports.go
cp enterprise/LICENSE ../enterprise-dir/ENTERPRISE-EDITION-LICENSE.txt
touch ../enterprise-dir/cloud/config/cloud_defaults.json
- name: Build
env:
BUILD_NUMBER: ${{ github.ref_name }}-${{ github.run_number }}
BUILD_ENTERPRISE_DIR: ../enterprise-dir
run: |
make config-reset
make build-cmd
make package
- name: Persist dist artifacts
uses: actions/upload-artifact@v4
with:
name: server-dist-artifact
path: server/dist/
retention-days: 14
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set version
id: version
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
run: echo "::set-output name=version::${GITHUB_REF#refs/tags/v}"
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: server/build
build-contexts:
dist=server/dist
build-args:
MM_PACKAGE=file:///tmp/mattermost-enterprise-linux-amd64.tar.gz
platforms: linux/amd64
push: ${{ startsWith(github.ref, 'refs/tags/v') }}
tags: |
ghcr.io/mattermost-enterprise-edition:${{ steps.version.outputs.version }}
cache-from: type=gha
cache-to: type=gha,mode=max