-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix packages build for the develop branch
- Loading branch information
1 parent
888f7d5
commit a8d8f01
Showing
1 changed file
with
17 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,9 @@ on: | |
description: 'Branch for server repository' | ||
required: true | ||
default: 'develop' | ||
push: | ||
branches: | ||
- bugfix/package-build | ||
|
||
concurrency: | ||
group: ${{ github.ref }} | ||
|
@@ -23,7 +26,7 @@ concurrency: | |
env: | ||
PRODUCT: ${{ github.event.repository.name }} | ||
PRODUCT_LOW: echo ${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]' | ||
PRODUCT_VERSION: echo ${{ github.ref }} | grep -oP '\d+\.\d+\.\d+' || echo '2.5.0' | ||
PRODUCT_VERSION: echo ${{ github.ref }} | grep -oP '\d+\.\d+\.\d+' || echo '2.6.3' | ||
BUILD_NUMBER: ${{ github.run_number }} | ||
PACKAGE_DIRECTORY: "/home/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}" | ||
BRANCH_BUILDTOOLS: ${{ github.event.inputs.branch-buildtools }} | ||
|
@@ -48,6 +51,13 @@ jobs: | |
sudo rm -rf /usr/local/lib/android /opt/ghc | ||
sudo docker image prune --all --force | ||
- name: Set default branches for push | ||
if: github.event_name == 'push' | ||
run: | | ||
echo "BRANCH_BUILDTOOLS=bugfix/package-build" >> $GITHUB_ENV | ||
echo "BRANCH_CLIENT=develop" >> $GITHUB_ENV | ||
echo "BRANCH_SERVER=develop" >> $GITHUB_ENV | ||
- name: Import GPG | ||
uses: crazy-max/ghaction-import-gpg@v5 | ||
id: gpg_step | ||
|
@@ -73,7 +83,10 @@ jobs: | |
tr [:upper:] [:lower:])/$(lsb_release -rs)/packages-microsoft-prod.deb -O packages-microsoft-prod.deb | ||
sudo dpkg -i packages-microsoft-prod.deb | ||
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo bash - | ||
sudo apt install -y dotnet-sdk-8.0 yarn nodejs rename | ||
sudo apt install -y dotnet-sdk-8.0 yarn nodejs rename unzip maven openjdk-21-jdk-headless | ||
JAVA_PATH=$(find /usr/lib/jvm/ -name "java" -path "*java-${JAVA_VERSION}*" | head -1) | ||
sudo update-alternatives --install /usr/bin/java java "$JAVA_PATH" 100 && sudo update-alternatives --set java "$JAVA_PATH" | ||
echo "JAVA_HOME=$(dirname $(dirname "$JAVA_PATH"))" >> $GITHUB_ENV | ||
sudo npm install -g json | ||
if [[ "${{ matrix.packageType }}" == "rpm" ]]; then | ||
sudo apt install -y python3-rpm python3-pip | ||
|
@@ -89,9 +102,9 @@ jobs: | |
wget -q -O ./debian/source/buildtools.tar.gz "https://github.com/ONLYOFFICE/$PRODUCT-buildtools/archive/${BRANCH_BUILDTOOLS}.tar.gz" | ||
wget -q -O ./debian/source/client.tar.gz "https://github.com/ONLYOFFICE/$PRODUCT-client/archive/${BRANCH_CLIENT}.tar.gz" | ||
wget -q -O ./debian/source/server.tar.gz "https://github.com/ONLYOFFICE/$PRODUCT-server/archive/${BRANCH_SERVER}.tar.gz" | ||
wget -q -O ./debian/source/dictionaries.tar.gz "https://github.com/ONLYOFFICE/dictionaries/archive/master.tar.gz" | ||
wget -q -O ./debian/source/DocStore.tar.gz "https://github.com/ONLYOFFICE/document-templates/archive/main/community-server.tar.gz" | ||
wget -q -O ./debian/source/campaigns.tar.gz "https://github.com/ONLYOFFICE/ASC.Web.Campaigns/archive/master.tar.gz" | ||
wget -q -O ./debian/source/plugins.tar.gz "https://github.com/ONLYOFFICE/$PRODUCT-plugins/archive/master.tar.gz" | ||
rename -f -v "s/product([^\/]*)$/$(${{ env.PRODUCT_LOW }})\$1/g" debian/* | ||
find debian/ -type f -exec sed -i "s/{{product}}/$(${{ env.PRODUCT_LOW }})/g" {} ';' | ||
|
@@ -105,9 +118,9 @@ jobs: | |
wget -q -O ./SOURCES/buildtools.tar.gz "https://github.com/ONLYOFFICE/$PRODUCT-buildtools/archive/${BRANCH_BUILDTOOLS}.tar.gz" | ||
wget -q -O ./SOURCES/client.tar.gz "https://github.com/ONLYOFFICE/$PRODUCT-client/archive/${BRANCH_CLIENT}.tar.gz" | ||
wget -q -O ./SOURCES/server.tar.gz "https://github.com/ONLYOFFICE/$PRODUCT-server/archive/${BRANCH_SERVER}.tar.gz" | ||
wget -q -O ./SOURCES/dictionaries.tar.gz "https://github.com/ONLYOFFICE/dictionaries/archive/master.tar.gz" | ||
wget -q -O ./SOURCES/DocStore.tar.gz "https://github.com/ONLYOFFICE/document-templates/archive/main/community-server.tar.gz" | ||
wget -q -O ./SOURCES/campaigns.tar.gz "https://github.com/ONLYOFFICE/ASC.Web.Campaigns/archive/master.tar.gz" | ||
wget -q -O ./SOURCES/plugins.tar.gz "https://github.com/ONLYOFFICE/$PRODUCT-plugins/archive/master.tar.gz" | ||
mv ./SOURCES/product.rpmlintrc ./SOURCES/$(${{ env.PRODUCT_LOW }}).rpmlintrc | ||
sed -i -e '/BuildRequires/d' product.spec | ||
rpmbuild -D "packager Ascensio System SIA <[email protected]>" \ | ||
|