Kaydet (Commit) df1ca175 authored tarafından Mert ÇELEN's avatar Mert ÇELEN

Re-enable github actions.

üst 90212c22
name: Liman CI
on: [push]
runs-on: ubuntu-latest
- name: Getting Main Liman Repository
uses: actions/checkout@v2
path: package/liman/server
- name: Checking code format
run: |
sudo apt install npm -y
cd package/liman/server/
npm install
npm run check
- name: Getting Liman' PHP Sandbox
uses: actions/checkout@v2
repository: mertcelen/liman-sandbox
path: package/liman/sandbox/php
token: ${{ secrets.CI_TOKEN }}
- name: Getting Liman' Python Sandbox
uses: actions/checkout@v2
repository: mertcelen/liman-sandbox-python
path: package/liman/sandbox/python
token: ${{ secrets.CI_TOKEN }}
- name: Getting Liman' WebSSH
uses: actions/checkout@v2
repository: mertcelen/webssh
path: package/liman/webssh
token: ${{ secrets.CI_TOKEN }}
- name: Set up Liman Environment
uses: shivammathur/setup-php@v2
php-version: "7.3"
tools: composer
extensions : ssh2, curl, sqlite3, ldap, mbstring, xml, zip, posix, smbclient, mongodb, gd
- name: Build Liman Package
run: |
DEBIAN_FRONTEND=noninteractive sudo apt install jq -y 1>/dev/null 2>/dev/null
VERSION=`cat package/liman/server/storage/VERSION`
COMMIT="${GITHUB_REF#refs/heads/} : "
COMMIT+=`git --git-dir=package/liman/server/.git log -1 --pretty=%B`
COMMIT=`echo $COMMIT | jq -SrR @uri`
composer clearcache
composer install --no-dev -d package/liman/server
git --git-dir=package/liman/server/.git log -30 --pretty=format:"%s%x09%ad" > package/liman/server/storage/changelog
rm -rf package/liman/server/.git package/liman/sandbox/php/.git package/liman/sandbox/python/.git
mv package/liman/server/build_tools/DEBIAN package/
rm -rf package/liman/server/build_tools
cd package
touch DEBIAN/md5sums
touch DEBIAN/md5sums
touch DEBIAN/control
find . -type f ! -regex '.*.hg.*' ! -regex '.*?debian-binary.*' ! -regex '.*?DEBIAN.*' -printf '%P ' | xargs md5sum 1>/dev/null 2>/dev/null || true
chmod 775 DEBIAN/preinst
chmod 775 DEBIAN/postinst
echo """Package: Liman
Installed-Size: 29892
Maintainer: Mert CELEN <mcelen@havelsan.com.tr>
Section: admin
Date : $DATE
Architecture: amd64
Priority: important
Description: Liman MYS
Depends: zip, unzip, dnsutils, nginx, php7.3-fpm, php7.3-curl, php7.3, php7.3-sqlite3, php7.3-ldap, php7.3-mbstring, php7.3-xml, php7.3-zip, php7.3-ssh2, php7.3-posix, libnginx-mod-http-headers-more-filter, php7.3-smbclient, krb5-user, smbclient, libssl1.1, acl, novnc, supervisor, expect, php-mongodb, php7.3-gd, rsyslog, python3.7, python3-jinja2, python3-requests, python3-crypto, python3-paramiko, python3-tornado
""" > DEBIAN/control
cd ../
dpkg-deb -Zgzip --build package
[ "$GITHUB_REF" == "refs/heads/master" ] && CHANNEL="liman-release" || CHANNEL="liman-dev-release"
[ "$GITHUB_REF" == "refs/heads/master" ] && FILE_NAME="liman-$VERSION-$GITHUB_RUN_ID.deb" || FILE_NAME="liman-${GITHUB_REF#refs/heads/}-$VERSION-$GITHUB_RUN_ID.deb"
curl -F "file=@/home/runner/work/liman/liman/package.deb" "https://slack.com/api/files.upload?token=xoxb-474187933397-695167035444-NFLf9tgYahuMsmeT7rwp5wnD&channels=$CHANNEL&filename=$FILE_NAME&pretty=1&initial_comment=$COMMIT" || echo
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment