Compare commits

...
Sign in to create a new pull request.

19 commits
develop ... dev

Author SHA1 Message Date
harid
146db902fc Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 52s
2026-07-01 10:53:06 +07:00
harid
821fc62daa Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 44s
2026-06-30 17:36:17 +07:00
harid
c79ea6a2de Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 54s
2026-06-25 17:25:13 +07:00
harid
75f9d53af0 Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 49s
2026-06-25 16:52:29 +07:00
harid
d95dfdfca8 Merge branch 'develop-br!ght' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 49s
2026-06-25 16:44:05 +07:00
harid
b637734690 Merge branch 'develop-br!ght' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 51s
2026-06-25 16:24:36 +07:00
harid
6cc9ad5dd6 Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 7m2s
2026-06-25 14:15:10 +07:00
harid
88dd36adcc build tag
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m20s
2026-03-05 14:19:25 +07:00
harid
fdafb5aad5 Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 47s
2026-03-02 17:46:18 +07:00
harid
c20d9c8573 Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 42s
2025-12-08 09:37:41 +07:00
harid
5e440b1082 Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 50s
2025-11-14 21:33:37 +07:00
5cf3ec8d3f Merge branch 'dev' of https://192.168.1.60/hrms-bangkok/hrms-report-v1 into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 44s
* 'dev' of https://192.168.1.60/hrms-bangkok/hrms-report-v1:
2025-11-04 09:04:42 +07:00
486cd2fd40 Merge branch 'develop' into dev
* develop:
  fix download report error
  build reload image
2025-11-04 09:04:36 +07:00
harid
c89cfd9b30 Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 42s
2025-10-24 16:40:44 +07:00
3ed62cea92 Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 49s
* develop:
  build reload image
  add authname
  แก้ลำดับผลสอบ
  test build
  build no noti
  โหลดใบรับรอง
2025-09-30 16:12:28 +07:00
6a28b26633 add cicd
All checks were successful
Build & Deploy on Dev / build (push) Successful in 51s
2025-09-16 15:48:49 +07:00
c295505fa8 update 2025-09-09 16:03:18 +07:00
39d693d11d update 2025-09-09 16:02:23 +07:00
008c294f82 build and deploy config 2025-09-09 16:00:19 +07:00
3 changed files with 160 additions and 0 deletions

View file

@ -0,0 +1,49 @@
name: Build
# on:
# push:
# tags:
# - "v[0-9]+.[0-9]+.[0-9]+"
# - "v[0-9]+.[0-9]+.[0-9]+*"
# workflow_dispatch:
env:
REGISTRY: ${{ vars.CONTAINER_REGISTRY }}
REGISTRY_USERNAME: ${{ vars.CONTAINER_REGISTRY_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.CONTAINER_REGISTRY_PASSWORD }}
CONTAINER_IMAGE_NAME: ${{ vars.CONTAINER_REGISTRY }}/${{ vars.CONTAINER_IMAGE_OWNER }}/${{ vars.CONTAINER_IMAGE_NAME }}
IMAGE_VERSION: build
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
config-inline: |
[registry."${{ env.REGISTRY }}"]
ca=["/etc/ssl/certs/ca-certificates.crt"]
- name: Tag Version
run: |
if [[ "${{ github.event_name }}" == "push" ]]; then
echo "IMAGE_VERSION=${{ github.ref_name }}" | sed 's/v//g' >> $GITHUB_ENV
else
echo "IMAGE_VERSION=${{ env.IMAGE_VERSION }}-${{ github.run_number }}" >> $GITHUB_ENV
fi
- name: Login in to registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ env.REGISTRY_USERNAME }}
password: ${{ env.REGISTRY_PASSWORD }}
- name: Build and push docker image
uses: docker/build-push-action@v3
with:
platforms: linux/amd64
context: .
file: Dockerfile
tags: ${{ env.CONTAINER_IMAGE_NAME }}:latest,${{ env.CONTAINER_IMAGE_NAME }}:${{ env.IMAGE_VERSION }}
push: true

View file

@ -0,0 +1,82 @@
name: Build & Deploy on Dev
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
workflow_dispatch:
env:
REGISTRY: ${{ vars.CONTAINER_REGISTRY }}
REGISTRY_USERNAME: ${{ vars.CONTAINER_REGISTRY_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.CONTAINER_REGISTRY_PASSWORD }}
CONTAINER_IMAGE_NAME: ${{ vars.CONTAINER_REGISTRY }}/${{ vars.CONTAINER_IMAGE_OWNER }}/${{ vars.CONTAINER_IMAGE_NAME }}
IMAGE_VERSION: latest
DISCORD_WEBHOOK: ${{ vars.DISCORD_WEBHOOK }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
config-inline: |
[registry."${{ env.REGISTRY }}"]
ca=["/etc/ssl/certs/ca-certificates.crt"]
- name: Tag Version
run: |
if [ "${{ github.ref_type }}" == "tag" ]; then
echo "IMAGE_VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
else
echo "IMAGE_VERSION=latest" >> $GITHUB_ENV
fi
- name: Login in to registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ env.REGISTRY_USERNAME }}
password: ${{ env.REGISTRY_PASSWORD }}
- name: Build and push docker image
uses: docker/build-push-action@v3
with:
platforms: linux/amd64
context: .
file: Dockerfile
tags: ${{ env.CONTAINER_IMAGE_NAME }}:latest,${{ env.CONTAINER_IMAGE_NAME }}:${{ env.IMAGE_VERSION }}
push: true
- name: Remote Deploy
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ vars.SSH_DEPLOY_HOST }}
port: ${{ vars.SSH_DEPLOY_PORT }}
username: ${{ secrets.SSH_DEPLOY_USER }}
password: ${{ secrets.SSH_DEPLOY_PASSWORD }}
script: |
cd ~/repo
./replace-env.sh API_REPORT_V1 "${{ env.IMAGE_VERSION }}"
./deploy.sh hrms-api-report-v1
- name: Discord Notification
if: always()
run: |
STATUS="${{ job.status == 'success' && '✅ Success' || '❌ Failed' }}"
COLOR="${{ job.status == 'success' && '3066993' || '15158332' }}"
TIMESTAMP=$(date -u +%Y-%m-%dT%H:%M:%SZ)
curl -H "Content-Type: application/json" \
-X POST \
-d "{
\"embeds\": [{
\"title\": \"$STATUS\",
\"description\": \"**Build & Deploy**\\n- Image: \`${{ env.CONTAINER_IMAGE_NAME }}\`\\n- Version: \`${{ env.IMAGE_VERSION }}\`\\n- By: \`${{ github.actor }}\`\",
\"color\": $COLOR,
\"footer\": {
\"text\": \"Release Notification\",
\"icon_url\": \"https://example.com/success-icon.png\"
},
\"timestamp\": \"$TIMESTAMP\"
}]
}" \
${{ env.DISCORD_WEBHOOK }}

View file

@ -0,0 +1,29 @@
name: Build
on:
workflow_dispatch:
inputs:
version:
description: "Version to deploy"
type: string
required: false
default: "latest"
env:
IMAGE_VERSION: build
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Remote Deploy
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ vars.SSH_DEPLOY_HOST }}
port: ${{ vars.SSH_DEPLOY_PORT }}
username: ${{ secrets.SSH_DEPLOY_USER }}
password: ${{ secrets.SSH_DEPLOY_PASSWORD }}
script: |
cd ~/repo
./replace-env.sh API_REPORT_V1 "${{ inputs.version }}"
./deploy.sh hrms-report-v1