feat: add enterprise license for MrRobot @ fSociety #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: 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/${{ github.repository }}:${{ github.ref_name }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |