Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 11ec5ef

Browse files
authoredDec 28, 2023
Merge pull request #38 from Nicklas373/dev/master-live
HANA PDF v2.3.4
2 parents 37182e0 + 3fa82b6 commit 11ec5ef

File tree

4 files changed

+59
-9
lines changed

4 files changed

+59
-9
lines changed
 

‎.github/workflows/docker-sit-env.yml

+17-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ jobs:
1616
- name: Cleanup Unused Docker Images
1717
run: docker rmi $(docker images -q) || true
1818

19-
- name: Build PDF Docker Image
19+
- name: Docker Notifications
20+
run: |
21+
chmod +x ./module/bash/docker-build-info.sh
22+
bash ./module/bash/docker-build-info.sh ${{ secrets.TG_TOKEN }} ${{ secrets.TG_CHAT_ID }} HANA_PDF_Container_[SIT] https://github.com/Nicklas373/Hana-PDF/actions/workflows/docker-sit-env.yml hana_pdf_build_image
23+
24+
- name: Build HANA PDF Docker Image
2025
run: |
2126
docker build \
2227
--build-arg DB_USERNAME=${{ secrets.DB_USERNAME }} \
@@ -53,7 +58,12 @@ jobs:
5358
- name: Cleanup Unused Docker Images
5459
run: docker rmi $(docker images -q) || true
5560

56-
- name: Build Instance Docker Image
61+
- name: Docker Notifications
62+
run: |
63+
chmod +x ./module/bash/docker-build-info.sh
64+
bash ./module/bash/docker-build-info.sh ${{ secrets.TG_TOKEN }} ${{ secrets.TG_CHAT_ID }} HANA_PDF_Container_[SIT] https://github.com/Nicklas373/Hana-PDF/actions/workflows/docker-sit-env.yml hana_instance_build_image
65+
66+
- name: Build HANA Instance Docker Image
5767
run: |
5868
docker build \
5969
--build-arg DB_USERNAME=${{ secrets.DB_USERNAME }} \
@@ -123,6 +133,11 @@ jobs:
123133
exit 1
124134
fi
125135
136+
- name: Docker Notifications
137+
run: |
138+
chmod +x ./module/bash/docker-build-info.sh
139+
bash ./module/bash/docker-build-info.sh ${{ secrets.TG_TOKEN }} ${{ secrets.TG_CHAT_ID }} HANA_PDF_Container_[SIT] https://github.com/Nicklas373/Hana-PDF/actions/workflows/docker-sit-env.yml deploy_to_sit
140+
126141
- name: Deploy Docker Image to SIT
127142
run: |
128143
echo ${{ secrets.DOCKER_PAT }} | docker login -u nicklas373 --password-stdin

‎README.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ HANA PDF is a __Laravel__ based project powered by front-end framework like __Vi
3434

3535
### Build Status
3636
- [![CodeQL](https://github.com/Nicklas373/Hana-PDF/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/Nicklas373/Hana-PDF/actions/workflows/github-code-scanning/codeql)
37-
- [![HANA-CI PDF SIT Container](https://github.com/Nicklas373/Hana-PDF/actions/workflows/docker-sit-env.yml/badge.svg)](https://github.com/Nicklas373/Hana-PDF/actions/workflows/docker-sit-env.yml)
38-
- [![HANA-CI PDF PROD Container](https://github.com/Nicklas373/hana-ci-docker-prod/actions/workflows/docker-prod-env.yml/badge.svg)](https://github.com/Nicklas373/hana-ci-docker-prod/actions/workflows/docker-prod-env.yml)
37+
- [![HANA PDF SIT Container](https://github.com/Nicklas373/Hana-PDF/actions/workflows/docker-sit-env.yml/badge.svg)](https://github.com/Nicklas373/Hana-PDF/actions/workflows/docker-sit-env.yml)
38+
- [![HANA PDF PROD Container](https://github.com/Nicklas373/hana-ci-docker-prod/actions/workflows/docker-prod-env.yml/badge.svg)](https://github.com/Nicklas373/hana-ci-docker-prod/actions/workflows/docker-prod-env.yml)
3939

4040
---
4141

4242
### Deployment On Docker [YOUR_LOCAL_IP_ADDRESS:80]
43-
## Step to configure
43+
#### Step to configure
4444
1. Clone the repository with __git clone__
4545
2. Go to root directory from this project
4646
3. Start to deploy
@@ -60,7 +60,7 @@ HANA PDF is a __Laravel__ based project powered by front-end framework like __Vi
6060
---
6161

6262
### Deployment On Native OS Host
63-
## Step to configure
63+
#### Step to configure
6464
1. Clone the repository with __git clone__
6565
2. Copy __.env.example__ file to __.env__ and modify database credentials
6666
3. Add additional environment into __.env__ with this string (Add yourself value :p)
@@ -93,12 +93,13 @@ HANA PDF is a __Laravel__ based project powered by front-end framework like __Vi
9393
- upload-pdf
9494
6. Start to deploy
9595
```bash
96+
- npm run dev -- --host
9697
- php artisan serve --host=localhost --port=80
9798
```
9899

99100
---
100101

101-
## Technology Stack
102+
### Technology Stack
102103
- [Aspose](https://www.aspose.cloud/)
103104
- [Docker](https://www.docker.com/)
104105
- [Flowbite](https://flowbite.com/)
@@ -110,7 +111,7 @@ HANA PDF is a __Laravel__ based project powered by front-end framework like __Vi
110111

111112
---
112113

113-
## License
114+
### License
114115
The HANA-CI PDF is a open source Laravel Project that has licensed under the [MIT license](https://opensource.org/licenses/MIT).
115116

116117
---

‎module/bash/docker-build-info.sh

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
3+
TG_TOKEN=$1
4+
TG_CHAT_ID=$2
5+
CONTAINER_NAME=$3
6+
WORKFLOW_URL=$4
7+
IMAGE_NAME=$5
8+
curdate=$(date)
9+
10+
function bot_template() {
11+
curl -s -X POST https://api.telegram.org/${TG_TOKEN}/sendMessage -d chat_id=${TG_CHAT_ID} -d "parse_mode=HTML" -d text="$(
12+
for POST in "${@}";
13+
do
14+
echo "${POST}"
15+
done
16+
)"
17+
}
18+
19+
# Telegram Bot Service || Compiling Message
20+
function bot_message() {
21+
bot_template "<b>|| HANA-CI Build Bot ||</b>" \
22+
"" \
23+
"<b> Github Workflow Start ! </b>" \
24+
"" \
25+
"============= Job Information ================" \
26+
"<b>Workflow :</b><code> ${CONTAINER_NAME} </code>" \
27+
"<b>Workflow Detail :</b><code><a href='${WORKFLOW_URL}'></a></code>" \
28+
"<b>Workflow Environment :</b><code> Production </code>" \
29+
"<b>Workflow Step :</b><code> ${IMAGE_NAME} </code>" \
30+
"<b>Workflow Start At :</b><code> ${curdate} </code>" \
31+
""
32+
}
33+
34+
bot_message

‎resources/views/layouts/default.blade.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html>
2+
<html lang="en">
33
<head>
44
@include('includes.head')
55
<header>@include('includes.header')</header>

0 commit comments

Comments
 (0)
Please sign in to comment.