Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
L
Liman MYS - Çekirdek
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
liman
Liman MYS - Çekirdek
Commits
e5ab5e63
Kaydet (Commit)
e5ab5e63
authored
Mar 29, 2021
tarafından
Baran Sekin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added mattermost
üst
9b4c8887
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
6 deletions
+30
-6
main.yml
.github/workflows/main.yml
+29
-4
create_deb.sh
storage/create_deb.sh
+1
-2
No files found.
.github/workflows/main.yml
Dosyayı görüntüle @
e5ab5e63
...
...
@@ -19,6 +19,10 @@ jobs:
env
:
PRIVATE_KEY
:
${{ secrets.PRIVATE_KEY }}
PASSPHRASE
:
${{ secrets.PASSPHRASE }}
MATTERMOST_TOKEN
:
${{ secrets.MATTERMOST_TOKEN }}
MATTERMOST_CHANNEL
:
${{ secrets.MATTERMOST_CHANNEL }}
MATTERMOST_DEV_CHANNEL
:
${{ secrets.MATTERMOST_DEV_CHANNEL }}
MATTERMOST_URL
:
${{ secrets.MATTERMOST_URL }}
run
:
|
sudo apt install zip gpg curl jq -y
mkdir -p /home/runner/.gnupg
...
...
@@ -29,8 +33,29 @@ jobs:
COMMIT="${GITHUB_REF#refs/heads/} : "
COMMIT+=`git --git-dir=package/liman/server/.git log -1 --pretty=%B`
sudo chmod +x package/liman/server/storage/create_deb.sh
./package/liman/server/storage/create_deb.sh master master master master $GITHUB_RUN_NUMBER $COMMIT $PASSPHRASE
./package/liman/server/storage/create_deb.sh master master master master $GITHUB_RUN_NUMBER $PASSPHRASE
ls -lah
ls -lah
\ No newline at end of file
[ "$GITHUB_REF" == "refs/heads/master" ] && CHANNEL=$MATTERMOST_CHANNEL || CHANNEL=$MATTERMOST_DEV_CHANNEL
[ "$GITHUB_REF" == "refs/heads/master" ] && FILE_NAME="$APP_NAME-$VERSION-$TYPE.signed" || FILE_NAME="$APP_NAME-${GITHUB_REF#refs/heads/}-$VERSION-$TYPE.signed"
cp package.deb $FILE_NAME
output=$(curl --location --request POST "$MATTERMOST_URL/api/v4/files?channel_id=$CHANNEL" \
--header "Authorization: Bearer $MATTERMOST_TOKEN" \
--header 'Content-Type: multipart/form-data' \
--form "files=@$FILE_NAME")
post_id=$(echo $output | grep '"id":"(.*)"' -oE | cut -d "," -f 1 | cut -d ":" -f 2 | xargs)
if [ -z "$post_id" ]; then
echo "Failed to create post :("
exit 4
else
curl --location --request POST "$MATTERMOST_URL/api/v4/posts" \
--header "Authorization: Bearer $MATTERMOST_TOKEN" \
--header "Content-Type: application/json" \
--data "{\"file_ids\":[\"$post_id\"],\"message\":\"$COMMIT\",\"channel_id\":\"$CHANNEL\"}"
fi
\ No newline at end of file
storage/create_deb.sh
Dosyayı görüntüle @
e5ab5e63
...
...
@@ -36,7 +36,6 @@ rm -rf master.zip webssh-master
#Setup variables and version codes.
VERSION
=
$(
cat
package/liman/server/storage/VERSION
)
echo
$5
>
package/liman/server/storage/VERSION_CODE
COMMIT
=
$(
echo
$6
| jq
-SrR
@uri
)
DATE
=
$(
date
)
#Install/Update dependencies
...
...
@@ -57,7 +56,7 @@ mkdir -p liman/hashes
find
.
-type
f
!
-regex
'.*.hg.*'
!
-regex
'.*?debian-binary.*'
!
-regex
'.*?DEBIAN.*'
-printf
'%P '
| xargs
md5sum
>
liman/hashes/core.md5
||
true
sed
-i
'/nginx.conf/d'
liman/hashes/core.md5
sed
-i
'/liman/hashes/d'
liman/hashes/core.md5
gpg
--batch
--yes
--passphrase
$
7
--default-key
aciklab@havelsan.com.tr
--sign
liman/hashes/core.md5
gpg
--batch
--yes
--passphrase
$
6
--default-key
aciklab@havelsan.com.tr
--sign
liman/hashes/core.md5
rm
liman/hashes/core.md5
chmod
775 DEBIAN/preinst
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment