2022-06-09 13:27:39 +03:00
|
|
|
### This workflow setup instance then build and push images ###
|
|
|
|
name: Multi-arch build stable
|
2023-11-20 12:05:00 +03:00
|
|
|
run-name: ${{ inputs.tag }} (${{ inputs.release_number }})
|
2022-06-09 13:27:39 +03:00
|
|
|
|
|
|
|
on:
|
2022-09-12 16:04:56 +03:00
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
tag:
|
|
|
|
description: 'Tag for release (ex. 1.2.3.45)'
|
|
|
|
type: string
|
|
|
|
required: true
|
2023-05-25 16:36:33 +03:00
|
|
|
release_number:
|
|
|
|
description: 'Sequence number of the release (ex. x.x.x.<number>)'
|
|
|
|
type: string
|
|
|
|
required: true
|
|
|
|
default: '1'
|
2022-06-09 13:27:39 +03:00
|
|
|
|
|
|
|
env:
|
|
|
|
COMPANY_NAME: "onlyoffice"
|
|
|
|
PRODUCT_NAME: "documentserver"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2022-08-29 11:40:25 +03:00
|
|
|
name: "Release image: DocumentServer${{ matrix.edition }}"
|
2022-06-09 13:27:39 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
2022-08-30 14:33:23 +03:00
|
|
|
fail-fast: false
|
2022-06-09 13:27:39 +03:00
|
|
|
matrix:
|
|
|
|
images: ["documentserver-stable"]
|
2022-06-10 15:43:50 +03:00
|
|
|
edition: ["", "-ee", "-de"]
|
2022-06-09 13:27:39 +03:00
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v2
|
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
|
|
|
|
- name: Login to Docker Hub
|
2022-08-29 11:40:25 +03:00
|
|
|
uses: docker/login-action@v2
|
2022-06-09 13:27:39 +03:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
|
|
|
|
2022-07-11 13:27:43 +03:00
|
|
|
- name: Build documentserver-release
|
2022-06-09 13:27:39 +03:00
|
|
|
run: |
|
2022-09-12 16:04:56 +03:00
|
|
|
set -eux
|
|
|
|
VERSION=${{ github.event.inputs.tag }}
|
2023-05-25 16:36:33 +03:00
|
|
|
RELEASE_NUMBER=${{ github.event.inputs.release_number }}
|
2022-09-12 16:04:56 +03:00
|
|
|
PRODUCT_EDITION=${{ matrix.edition }}
|
|
|
|
TESTING_IMAGE=${COMPANY_NAME}/4testing-${PRODUCT_NAME}${PRODUCT_EDITION}
|
|
|
|
export PRODUCT_EDITION
|
2023-05-25 16:36:33 +03:00
|
|
|
export PULL_TAG=${VERSION}
|
|
|
|
export TAG=${VERSION%.*}.${RELEASE_NUMBER}
|
2022-09-12 16:04:56 +03:00
|
|
|
export SHORTER_TAG=${VERSION%.*}
|
|
|
|
export SHORTEST_TAG=${VERSION%.*.*}
|
|
|
|
docker buildx bake -f docker-bake.hcl ${{ matrix.images }} --push
|
|
|
|
echo "DONE: Build success >> exit with 0"
|
|
|
|
exit 0
|
2022-06-09 13:27:39 +03:00
|
|
|
shell: bash
|
2022-08-29 11:40:25 +03:00
|
|
|
|
2022-09-12 16:04:56 +03:00
|
|
|
build-nonexample:
|
2022-08-29 11:40:25 +03:00
|
|
|
name: "Release image: DocumentServer${{ matrix.edition }}-nonExample"
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: [build]
|
2022-10-26 14:27:37 +03:00
|
|
|
if: ${{ false }}
|
2022-08-29 11:40:25 +03:00
|
|
|
strategy:
|
2022-08-30 14:33:23 +03:00
|
|
|
fail-fast: false
|
2022-08-29 11:40:25 +03:00
|
|
|
matrix:
|
|
|
|
images: ["documentserver-nonexample"]
|
|
|
|
edition: ["", "-ee", "-de"]
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v2
|
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
|
|
|
|
- name: Login to Docker Hub
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
|
|
|
|
|
|
|
- name: build image
|
|
|
|
run: |
|
2022-09-12 16:04:56 +03:00
|
|
|
set -eux
|
2023-05-25 16:36:33 +03:00
|
|
|
VERSION=${{ github.event.inputs.tag }}
|
|
|
|
RELEASE_NUMBER=${{ github.event.inputs.release_number }}
|
|
|
|
export PULL_TAG=${VERSION%.*}.${RELEASE_NUMBER}
|
2022-09-12 16:04:56 +03:00
|
|
|
export PRODUCT_EDITION=${{ matrix.edition }}
|
2023-05-25 16:36:33 +03:00
|
|
|
export TAG=${VERSION%.*}.${RELEASE_NUMBER}
|
2022-09-12 16:04:56 +03:00
|
|
|
docker buildx bake -f docker-bake.hcl ${{ matrix.images }} --push
|
2022-08-29 11:40:25 +03:00
|
|
|
shell: bash
|
2022-10-31 11:53:24 +03:00
|
|
|
|
|
|
|
build-ucs-ubuntu20:
|
|
|
|
name: "Release image: DocumentServer${{ matrix.edition }}-ucs"
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
edition: ["", "-ee"]
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v2
|
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
|
|
|
|
- name: Login to Docker Hub
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
|
|
|
|
|
|
|
- name: build UCS
|
|
|
|
run: |
|
|
|
|
set -eux
|
2023-05-25 16:36:33 +03:00
|
|
|
VERSION=${{ github.event.inputs.tag }}
|
|
|
|
RELEASE_NUMBER=${{ github.event.inputs.release_number }}
|
2022-10-31 11:53:24 +03:00
|
|
|
export PRODUCT_EDITION=${{ matrix.edition }}
|
2023-04-14 20:32:04 +03:00
|
|
|
export PACKAGE_BASEURL=${{ secrets.REPO_BASEURL }}
|
2022-10-31 11:53:24 +03:00
|
|
|
export DOCKERFILE=Dockerfile
|
|
|
|
export BASE_IMAGE=ubuntu:20.04
|
|
|
|
export PG_VERSION=12
|
2023-05-25 16:36:33 +03:00
|
|
|
export TAG=${VERSION%.*}.${RELEASE_NUMBER}
|
|
|
|
export PACKAGE_VERSION=$( echo ${VERSION} | sed -E 's/(.*)\./\1-/')
|
2022-10-31 11:53:24 +03:00
|
|
|
docker buildx bake -f docker-bake.hcl documentserver-ucs --push
|
|
|
|
shell: bash
|