Compare commits
93 commits
dev
...
leave-dev1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f5e242ab1d | ||
|
|
ed04bf8258 | ||
|
|
cb074e3e25 | ||
|
|
7e71f528ab | ||
| 9fe3c82a9b | |||
|
|
4a94aae6e3 | ||
| c87e467a6e | |||
| d10c86e0cb | |||
| 2b1d6852c9 | |||
| bde1aa21c9 | |||
| 8bb31b4e73 | |||
| 804a4cf85f | |||
|
|
b03be82f7c | ||
| ed26d8443c | |||
| b55e1d1f63 | |||
|
|
99838ba1ff | ||
| 37281fc036 | |||
|
|
80dca3dfac | ||
| 121e605699 | |||
|
|
e0d253cc68 | ||
| 90cb343941 | |||
|
|
9becd892f5 | ||
|
|
7e039b798d | ||
|
|
d703337b4b | ||
|
|
d7ebe9cdca | ||
|
|
199d0c90e3 | ||
|
|
0e21e10d24 | ||
|
|
07dd715e16 | ||
| b6862b93bf | |||
| b51cf9a919 | |||
|
|
14cc614864 | ||
|
|
51f1a4c563 | ||
|
|
b4e303e0a7 | ||
| ec3b267a6c | |||
| a047787fb4 | |||
|
|
21c10d66f5 | ||
|
|
d2569d8cef | ||
|
|
a9bacdc6ae | ||
|
|
84df3d4b86 | ||
|
|
287c11dfd5 | ||
|
|
17259598c9 | ||
|
|
223a78ce9e | ||
|
|
16cc6b5111 | ||
|
|
ee0bb692ec | ||
| 5dab116166 | |||
| b345091905 | |||
| 2295aedc3a | |||
|
|
0f45792e74 | ||
| fbcd1b6984 | |||
| 95c62accef | |||
| 6fb574f9de | |||
| 0dcd76c302 | |||
| 33e8bf5ab7 | |||
| 6d42484297 | |||
| f1c3163116 | |||
| 9a4e49eb88 | |||
| 69af557f95 | |||
| e52d6430b0 | |||
| 45f6c5626e | |||
| 063e54c4e0 | |||
| 7254b1ed87 | |||
| a892fe9ee3 | |||
| 0fe60d3212 | |||
| cd7ac8de17 | |||
| aa1708474b | |||
| 87e6f88cf6 | |||
| d0c5bafdba | |||
| 643b6903d9 | |||
| 5c0f8877a4 | |||
| c6c49ffaff | |||
| 51fc5c6395 | |||
| 6bba1b19ce | |||
| 777c9563ca | |||
| 62867d54c3 | |||
| 3c34245d1c | |||
| 5561817fa4 | |||
| ba7dae2bd8 | |||
| 829149a091 | |||
| d4e0661964 | |||
| 2abb32f74b | |||
| 7d680658e4 | |||
| d0cad2de8b | |||
| b01031e919 | |||
| 57a6d9a6c6 | |||
| 0516b289fe | |||
| fc26ab4064 | |||
| 223c891782 | |||
| 83926c534f | |||
| bfe1caa984 | |||
| 91a3aef5d7 | |||
| cbd1e8029d | |||
| bdd613b40f | |||
| 507d50dfe3 |
28 changed files with 1473 additions and 134 deletions
83
.forgejo/workflows/build-checkin.yml
Normal file
83
.forgejo/workflows/build-checkin.yml
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
name: Build & Deploy Checkin Service
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "checkin-dev[0-9]+.[0-9]+.[0-9]+"
|
||||
- "checkin-dev[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 }}
|
||||
IMAGE_VERSION: latest
|
||||
SERVICE_NAME: hrms-api-checkin
|
||||
DISCORD_WEBHOOK: ${{ vars.DISCORD_WEBHOOK }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Tag Version
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ "${{ github.event_name }}" == "push" ]]; then
|
||||
VERSION=$(echo "${{ github.ref_name }}" | sed 's/checkin-dev//g')
|
||||
echo "IMAGE_VERSION=${VERSION}" >> $GITHUB_ENV
|
||||
else
|
||||
echo "IMAGE_VERSION=${{ env.IMAGE_VERSION }}-${{ github.run_number }}" >> $GITHUB_ENV
|
||||
fi
|
||||
- name: Login in to registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ env.REGISTRY_USERNAME }}
|
||||
password: ${{ env.REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Build and push docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
platforms: linux/amd64
|
||||
context: .
|
||||
file: ./BMA.EHR.CheckInConsumer/Dockerfile
|
||||
tags: ${{ env.CONTAINER_IMAGE_NAME }}/${{ env.SERVICE_NAME }}:latest,${{ env.CONTAINER_IMAGE_NAME }}/${{ env.SERVICE_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_CHECKIN "${{ env.IMAGE_VERSION }}"
|
||||
./deploy.sh ${{ env.SERVICE_NAME }}
|
||||
|
||||
- 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 }}/${{ env.SERVICE_NAME }}\`\\n- Version: \`${{ env.IMAGE_VERSION }}\`\\n- By: \`${{ gitea.actor }}\`\",
|
||||
\"color\": $COLOR,
|
||||
\"footer\": {
|
||||
\"text\": \"Release Notification\",
|
||||
\"icon_url\": \"https://example.com/success-icon.png\"
|
||||
},
|
||||
\"timestamp\": \"$TIMESTAMP\"
|
||||
}]
|
||||
}" \
|
||||
${{ env.DISCORD_WEBHOOK }}
|
||||
61
.forgejo/workflows/build-command_backup.yml
Normal file
61
.forgejo/workflows/build-command_backup.yml
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
# name: Build
|
||||
|
||||
# on:
|
||||
# push:
|
||||
# tags:
|
||||
# - "command-dev[0-9]+.[0-9]+.[0-9]+"
|
||||
# - "command-dev[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 }}
|
||||
# IMAGE_VERSION: build
|
||||
# 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.event_name }}" == "push" ]]; then
|
||||
# echo "IMAGE_VERSION=${{ github.ref_name }}" | sed 's/command-dev//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: ./BMA.EHR.Command.Service/Dockerfile
|
||||
# tags: ${{ env.CONTAINER_IMAGE_NAME }}/hrms-api-command:latest,${{ env.CONTAINER_IMAGE_NAME }}/hrms-api-command:${{ 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_COMMAND "${{ env.IMAGE_VERSION }}"
|
||||
# ./deploy.sh hrms-api-command
|
||||
83
.forgejo/workflows/build-discipline.yml
Normal file
83
.forgejo/workflows/build-discipline.yml
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
name: Build & Deploy Discipline Service
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "discipline-dev[0-9]+.[0-9]+.[0-9]+"
|
||||
- "discipline-dev[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 }}
|
||||
IMAGE_VERSION: latest
|
||||
SERVICE_NAME: hrms-api-discipline
|
||||
DISCORD_WEBHOOK: ${{ vars.DISCORD_WEBHOOK }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Tag Version
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ "${{ github.event_name }}" == "push" ]]; then
|
||||
VERSION=$(echo "${{ github.ref_name }}" | sed 's/discipline-dev//g')
|
||||
echo "IMAGE_VERSION=${VERSION}" >> $GITHUB_ENV
|
||||
else
|
||||
echo "IMAGE_VERSION=${{ env.IMAGE_VERSION }}-${{ github.run_number }}" >> $GITHUB_ENV
|
||||
fi
|
||||
- name: Login in to registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ env.REGISTRY_USERNAME }}
|
||||
password: ${{ env.REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Build and push docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
platforms: linux/amd64
|
||||
context: .
|
||||
file: ./BMA.EHR.Discipline.Service/Dockerfile
|
||||
tags: ${{ env.CONTAINER_IMAGE_NAME }}/${{ env.SERVICE_NAME }}:latest,${{ env.CONTAINER_IMAGE_NAME }}/${{ env.SERVICE_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_DISCIPLINE "${{ env.IMAGE_VERSION }}"
|
||||
./deploy.sh ${{ env.SERVICE_NAME }}
|
||||
|
||||
- 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 }}/${{ env.SERVICE_NAME }}\`\\n- Version: \`${{ env.IMAGE_VERSION }}\`\\n- By: \`${{ gitea.actor }}\`\",
|
||||
\"color\": $COLOR,
|
||||
\"footer\": {
|
||||
\"text\": \"Release Notification\",
|
||||
\"icon_url\": \"https://example.com/success-icon.png\"
|
||||
},
|
||||
\"timestamp\": \"$TIMESTAMP\"
|
||||
}]
|
||||
}" \
|
||||
${{ env.DISCORD_WEBHOOK }}
|
||||
83
.forgejo/workflows/build-insignia.yml
Normal file
83
.forgejo/workflows/build-insignia.yml
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
name: Build & Deploy Insignia Service
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "insignia-dev[0-9]+.[0-9]+.[0-9]+"
|
||||
- "insignia-dev[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 }}
|
||||
IMAGE_VERSION: latest
|
||||
SERVICE_NAME: hrms-api-insignia
|
||||
DISCORD_WEBHOOK: ${{ vars.DISCORD_WEBHOOK }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Tag Version
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ "${{ github.event_name }}" == "push" ]]; then
|
||||
VERSION=$(echo "${{ github.ref_name }}" | sed 's/insignia-dev//g')
|
||||
echo "IMAGE_VERSION=${VERSION}" >> $GITHUB_ENV
|
||||
else
|
||||
echo "IMAGE_VERSION=${{ env.IMAGE_VERSION }}-${{ github.run_number }}" >> $GITHUB_ENV
|
||||
fi
|
||||
- name: Login in to registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ env.REGISTRY_USERNAME }}
|
||||
password: ${{ env.REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Build and push docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
platforms: linux/amd64
|
||||
context: .
|
||||
file: ./BMA.EHR.Insignia/Dockerfile
|
||||
tags: ${{ env.CONTAINER_IMAGE_NAME }}/${{ env.SERVICE_NAME }}:latest,${{ env.CONTAINER_IMAGE_NAME }}/${{ env.SERVICE_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_INSIGNIA "${{ env.IMAGE_VERSION }}"
|
||||
./deploy.sh ${{ env.SERVICE_NAME }}
|
||||
|
||||
- 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 }}/${{ env.SERVICE_NAME }}\`\\n- Version: \`${{ env.IMAGE_VERSION }}\`\\n- By: \`${{ gitea.actor }}\`\",
|
||||
\"color\": $COLOR,
|
||||
\"footer\": {
|
||||
\"text\": \"Release Notification\",
|
||||
\"icon_url\": \"https://example.com/success-icon.png\"
|
||||
},
|
||||
\"timestamp\": \"$TIMESTAMP\"
|
||||
}]
|
||||
}" \
|
||||
${{ env.DISCORD_WEBHOOK }}
|
||||
83
.forgejo/workflows/build-leave.yml
Normal file
83
.forgejo/workflows/build-leave.yml
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
name: Build & Deploy Leave Service
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "leave-dev[0-9]+.[0-9]+.[0-9]+"
|
||||
- "leave-dev[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 }}
|
||||
IMAGE_VERSION: latest
|
||||
SERVICE_NAME: hrms-api-leave
|
||||
DISCORD_WEBHOOK: ${{ vars.DISCORD_WEBHOOK }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Tag Version
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ "${{ github.event_name }}" == "push" ]]; then
|
||||
VERSION=$(echo "${{ github.ref_name }}" | sed 's/leave-dev//g')
|
||||
echo "IMAGE_VERSION=${VERSION}" >> $GITHUB_ENV
|
||||
else
|
||||
echo "IMAGE_VERSION=${{ env.IMAGE_VERSION }}-${{ github.run_number }}" >> $GITHUB_ENV
|
||||
fi
|
||||
- name: Login in to registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ env.REGISTRY_USERNAME }}
|
||||
password: ${{ env.REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Build and push docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
platforms: linux/amd64
|
||||
context: .
|
||||
file: ./BMA.EHR.Leave/Dockerfile
|
||||
tags: ${{ env.CONTAINER_IMAGE_NAME }}/${{ env.SERVICE_NAME }}:latest,${{ env.CONTAINER_IMAGE_NAME }}/${{ env.SERVICE_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_LEAVE "${{ env.IMAGE_VERSION }}"
|
||||
./deploy.sh ${{ env.SERVICE_NAME }}
|
||||
|
||||
- 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 }}/${{ env.SERVICE_NAME }}\`\\n- Version: \`${{ env.IMAGE_VERSION }}\`\\n- By: \`${{ gitea.actor }}\`\",
|
||||
\"color\": $COLOR,
|
||||
\"footer\": {
|
||||
\"text\": \"Release Notification\",
|
||||
\"icon_url\": \"https://example.com/success-icon.png\"
|
||||
},
|
||||
\"timestamp\": \"$TIMESTAMP\"
|
||||
}]
|
||||
}" \
|
||||
${{ env.DISCORD_WEBHOOK }}
|
||||
83
.forgejo/workflows/build-placement.yml
Normal file
83
.forgejo/workflows/build-placement.yml
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
name: Build & Deploy Placement Service
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "placement-dev[0-9]+.[0-9]+.[0-9]+"
|
||||
- "placement-dev[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 }}
|
||||
IMAGE_VERSION: latest
|
||||
SERVICE_NAME: hrms-api-placement
|
||||
DISCORD_WEBHOOK: ${{ vars.DISCORD_WEBHOOK }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Tag Version
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ "${{ github.event_name }}" == "push" ]]; then
|
||||
VERSION=$(echo "${{ github.ref_name }}" | sed 's/placement-dev//g')
|
||||
echo "IMAGE_VERSION=${VERSION}" >> $GITHUB_ENV
|
||||
else
|
||||
echo "IMAGE_VERSION=${{ env.IMAGE_VERSION }}-${{ github.run_number }}" >> $GITHUB_ENV
|
||||
fi
|
||||
- name: Login in to registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ env.REGISTRY_USERNAME }}
|
||||
password: ${{ env.REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Build and push docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
platforms: linux/amd64
|
||||
context: .
|
||||
file: ./BMA.EHR.Placement.Service/Dockerfile
|
||||
tags: ${{ env.CONTAINER_IMAGE_NAME }}/${{ env.SERVICE_NAME }}:latest,${{ env.CONTAINER_IMAGE_NAME }}/${{ env.SERVICE_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_PLACEMENT "${{ env.IMAGE_VERSION }}"
|
||||
./deploy.sh ${{ env.SERVICE_NAME }}
|
||||
|
||||
- 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 }}/${{ env.SERVICE_NAME }}\`\\n- Version: \`${{ env.IMAGE_VERSION }}\`\\n- By: \`${{ gitea.actor }}\`\",
|
||||
\"color\": $COLOR,
|
||||
\"footer\": {
|
||||
\"text\": \"Release Notification\",
|
||||
\"icon_url\": \"https://example.com/success-icon.png\"
|
||||
},
|
||||
\"timestamp\": \"$TIMESTAMP\"
|
||||
}]
|
||||
}" \
|
||||
${{ env.DISCORD_WEBHOOK }}
|
||||
84
.forgejo/workflows/build-report_backup.yml
Normal file
84
.forgejo/workflows/build-report_backup.yml
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
# name: Build
|
||||
|
||||
# on:
|
||||
# push:
|
||||
# tags:
|
||||
# - "report-dev[0-9]+.[0-9]+.[0-9]+"
|
||||
# - "report-dev[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 }}
|
||||
# SERVICE_NAME: hrms-api-report
|
||||
# IMAGE_VERSION: build
|
||||
# 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.event_name }}" == "push" ]]; then
|
||||
# echo "IMAGE_VERSION=${{ github.ref_name }}" | sed 's/report-dev//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: ./BMA.EHR.Report.Service/Dockerfile
|
||||
# tags: ${{ env.CONTAINER_IMAGE_NAME }}/${{ env.SERVICE_NAME }}:latest,${{ env.CONTAINER_IMAGE_NAME }}/${{ env.SERVICE_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 "${{ env.IMAGE_VERSION }}"
|
||||
# ./deploy.sh ${{ env.SERVICE_NAME }}
|
||||
|
||||
# - 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 }}/${{ env.SERVICE_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 }}
|
||||
83
.forgejo/workflows/build-retirement.yml
Normal file
83
.forgejo/workflows/build-retirement.yml
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
name: Build & Deploy Retirement Service
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "retirement-dev[0-9]+.[0-9]+.[0-9]+"
|
||||
- "retirement-dev[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 }}
|
||||
IMAGE_VERSION: latest
|
||||
SERVICE_NAME: hrms-api-retirement
|
||||
DISCORD_WEBHOOK: ${{ vars.DISCORD_WEBHOOK }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Tag Version
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ "${{ github.event_name }}" == "push" ]]; then
|
||||
VERSION=$(echo "${{ github.ref_name }}" | sed 's/retirement-dev//g')
|
||||
echo "IMAGE_VERSION=${VERSION}" >> $GITHUB_ENV
|
||||
else
|
||||
echo "IMAGE_VERSION=${{ env.IMAGE_VERSION }}-${{ github.run_number }}" >> $GITHUB_ENV
|
||||
fi
|
||||
- name: Login in to registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ env.REGISTRY_USERNAME }}
|
||||
password: ${{ env.REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Build and push docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
platforms: linux/amd64
|
||||
context: .
|
||||
file: ./BMA.EHR.Retirement.Service/Dockerfile
|
||||
tags: ${{ env.CONTAINER_IMAGE_NAME }}/${{ env.SERVICE_NAME }}:latest,${{ env.CONTAINER_IMAGE_NAME }}/${{ env.SERVICE_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_RETIREMENT "${{ env.IMAGE_VERSION }}"
|
||||
./deploy.sh ${{ env.SERVICE_NAME }}
|
||||
|
||||
- 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 }}/${{ env.SERVICE_NAME }}\`\\n- Version: \`${{ env.IMAGE_VERSION }}\`\\n- By: \`${{ gitea.actor }}\`\",
|
||||
\"color\": $COLOR,
|
||||
\"footer\": {
|
||||
\"text\": \"Release Notification\",
|
||||
\"icon_url\": \"https://example.com/success-icon.png\"
|
||||
},
|
||||
\"timestamp\": \"$TIMESTAMP\"
|
||||
}]
|
||||
}" \
|
||||
${{ env.DISCORD_WEBHOOK }}
|
||||
49
.forgejo/workflows/build.yml
Normal file
49
.forgejo/workflows/build.yml
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "leave[0-9]+.[0-9]+.[0-9]+"
|
||||
- "leave[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 }}
|
||||
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/leave//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: ./BMA.EHR.Leave/Dockerfile
|
||||
tags: ${{ env.CONTAINER_IMAGE_NAME }}/hrms-leave:latest,${{ env.CONTAINER_IMAGE_NAME }}/hrms-leave:${{ env.IMAGE_VERSION }}
|
||||
push: true
|
||||
29
.forgejo/workflows/deploy.yml
Normal file
29
.forgejo/workflows/deploy.yml
Normal 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_LEAVE "${{ inputs.version }}"
|
||||
./deploy.sh hrms-api-leave
|
||||
72
.github/workflows/dockerhub-release-checkin.yaml
vendored
Normal file
72
.github/workflows/dockerhub-release-checkin.yaml
vendored
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
name: DockerHub Release - CheckIn Consumer
|
||||
run-name: DockerHub Release - CheckIn Consumer by ${{ github.actor }}
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "checkin-[0-9]+.[0-9]+.[0-9]+"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
IMAGE_VER:
|
||||
description: "Image version (e.g., latest, v1.0.0)"
|
||||
required: false
|
||||
default: "latest"
|
||||
|
||||
env:
|
||||
DOCKERHUB_REGISTRY: docker.io
|
||||
IMAGE_NAME: hrms-api-checkin
|
||||
|
||||
jobs:
|
||||
release-to-dockerhub:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set output tags
|
||||
id: vars
|
||||
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Generate version
|
||||
id: gen_ver
|
||||
run: |
|
||||
if [[ $GITHUB_REF == 'refs/tags/'* ]]; then
|
||||
IMAGE_VER=${{ steps.vars.outputs.tag }}
|
||||
else
|
||||
IMAGE_VER=${{ github.event.inputs.IMAGE_VER }}
|
||||
fi
|
||||
if [[ $IMAGE_VER == '' ]]; then
|
||||
IMAGE_VER='test-vBeta'
|
||||
fi
|
||||
echo "image_ver=${IMAGE_VER}" >> $GITHUB_OUTPUT
|
||||
echo "Generated version: ${IMAGE_VER}"
|
||||
|
||||
- name: Display version
|
||||
run: |
|
||||
echo "Git Ref: $GITHUB_REF"
|
||||
echo "Image Version: ${{ steps.gen_ver.outputs.image_ver }}"
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{env.DOCKERHUB_REGISTRY}}
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: BMA.EHR.CheckInConsumer/Dockerfile
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: |
|
||||
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ steps.gen_ver.outputs.image_ver }}
|
||||
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest
|
||||
labels: |
|
||||
org.opencontainers.image.title=BMA EHR CheckIn Consumer
|
||||
org.opencontainers.image.description=HRMS CheckIn Consumer Service
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
72
.github/workflows/dockerhub-release-command.yaml
vendored
Normal file
72
.github/workflows/dockerhub-release-command.yaml
vendored
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
name: DockerHub Release - Command Service
|
||||
run-name: DockerHub Release - Command Service by ${{ github.actor }}
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "command-[0-9]+.[0-9]+.[0-9]+"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
IMAGE_VER:
|
||||
description: "Image version (e.g., latest, v1.0.0)"
|
||||
required: false
|
||||
default: "latest"
|
||||
|
||||
env:
|
||||
DOCKERHUB_REGISTRY: docker.io
|
||||
IMAGE_NAME: hrms-api-command
|
||||
|
||||
jobs:
|
||||
release-to-dockerhub:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set output tags
|
||||
id: vars
|
||||
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Generate version
|
||||
id: gen_ver
|
||||
run: |
|
||||
if [[ $GITHUB_REF == 'refs/tags/'* ]]; then
|
||||
IMAGE_VER=${{ steps.vars.outputs.tag }}
|
||||
else
|
||||
IMAGE_VER=${{ github.event.inputs.IMAGE_VER }}
|
||||
fi
|
||||
if [[ $IMAGE_VER == '' ]]; then
|
||||
IMAGE_VER='test-vBeta'
|
||||
fi
|
||||
echo "image_ver=${IMAGE_VER}" >> $GITHUB_OUTPUT
|
||||
echo "Generated version: ${IMAGE_VER}"
|
||||
|
||||
- name: Display version
|
||||
run: |
|
||||
echo "Git Ref: $GITHUB_REF"
|
||||
echo "Image Version: ${{ steps.gen_ver.outputs.image_ver }}"
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{env.DOCKERHUB_REGISTRY}}
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: BMA.EHR.Command.Service/Dockerfile
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: |
|
||||
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ steps.gen_ver.outputs.image_ver }}
|
||||
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest
|
||||
labels: |
|
||||
org.opencontainers.image.title=BMA EHR Command Service
|
||||
org.opencontainers.image.description=HRMS Command API Service
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
72
.github/workflows/dockerhub-release-discipline.yaml
vendored
Normal file
72
.github/workflows/dockerhub-release-discipline.yaml
vendored
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
name: DockerHub Release - Discipline Service
|
||||
run-name: DockerHub Release - Discipline Service by ${{ github.actor }}
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "discipline-[0-9]+.[0-9]+.[0-9]+"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
IMAGE_VER:
|
||||
description: "Image version (e.g., latest, v1.0.0)"
|
||||
required: false
|
||||
default: "latest"
|
||||
|
||||
env:
|
||||
DOCKERHUB_REGISTRY: docker.io
|
||||
IMAGE_NAME: hrms-api-discipline
|
||||
|
||||
jobs:
|
||||
release-to-dockerhub:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set output tags
|
||||
id: vars
|
||||
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Generate version
|
||||
id: gen_ver
|
||||
run: |
|
||||
if [[ $GITHUB_REF == 'refs/tags/'* ]]; then
|
||||
IMAGE_VER=${{ steps.vars.outputs.tag }}
|
||||
else
|
||||
IMAGE_VER=${{ github.event.inputs.IMAGE_VER }}
|
||||
fi
|
||||
if [[ $IMAGE_VER == '' ]]; then
|
||||
IMAGE_VER='test-vBeta'
|
||||
fi
|
||||
echo "image_ver=${IMAGE_VER}" >> $GITHUB_OUTPUT
|
||||
echo "Generated version: ${IMAGE_VER}"
|
||||
|
||||
- name: Display version
|
||||
run: |
|
||||
echo "Git Ref: $GITHUB_REF"
|
||||
echo "Image Version: ${{ steps.gen_ver.outputs.image_ver }}"
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{env.DOCKERHUB_REGISTRY}}
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: BMA.EHR.Discipline.Service/Dockerfile
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: |
|
||||
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ steps.gen_ver.outputs.image_ver }}
|
||||
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest
|
||||
labels: |
|
||||
org.opencontainers.image.title=BMA EHR Discipline Service
|
||||
org.opencontainers.image.description=HRMS Discipline API Service
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
72
.github/workflows/dockerhub-release-insignia.yaml
vendored
Normal file
72
.github/workflows/dockerhub-release-insignia.yaml
vendored
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
name: DockerHub Release - Insignia Service
|
||||
run-name: DockerHub Release - Insignia Service by ${{ github.actor }}
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "insignia-[0-9]+.[0-9]+.[0-9]+"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
IMAGE_VER:
|
||||
description: "Image version (e.g., latest, v1.0.0)"
|
||||
required: false
|
||||
default: "latest"
|
||||
|
||||
env:
|
||||
DOCKERHUB_REGISTRY: docker.io
|
||||
IMAGE_NAME: hrms-api-insignia
|
||||
|
||||
jobs:
|
||||
release-to-dockerhub:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set output tags
|
||||
id: vars
|
||||
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Generate version
|
||||
id: gen_ver
|
||||
run: |
|
||||
if [[ $GITHUB_REF == 'refs/tags/'* ]]; then
|
||||
IMAGE_VER=${{ steps.vars.outputs.tag }}
|
||||
else
|
||||
IMAGE_VER=${{ github.event.inputs.IMAGE_VER }}
|
||||
fi
|
||||
if [[ $IMAGE_VER == '' ]]; then
|
||||
IMAGE_VER='test-vBeta'
|
||||
fi
|
||||
echo "image_ver=${IMAGE_VER}" >> $GITHUB_OUTPUT
|
||||
echo "Generated version: ${IMAGE_VER}"
|
||||
|
||||
- name: Display version
|
||||
run: |
|
||||
echo "Git Ref: $GITHUB_REF"
|
||||
echo "Image Version: ${{ steps.gen_ver.outputs.image_ver }}"
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{env.DOCKERHUB_REGISTRY}}
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: BMA.EHR.Insignia/Dockerfile
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: |
|
||||
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ steps.gen_ver.outputs.image_ver }}
|
||||
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest
|
||||
labels: |
|
||||
org.opencontainers.image.title=BMA EHR Insignia Service
|
||||
org.opencontainers.image.description=HRMS Insignia API Service
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
90
.github/workflows/dockerhub-release-leave.yaml
vendored
Normal file
90
.github/workflows/dockerhub-release-leave.yaml
vendored
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
name: DockerHub Release - Leave Service
|
||||
run-name: DockerHub Release - Leave Service by ${{ github.actor }}
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "leave-[0-9]+.[0-9]+.[0-9]+"
|
||||
# branches:
|
||||
# - main
|
||||
# - develop
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
IMAGE_VER:
|
||||
description: "Image version (e.g., latest, v1.0.0)"
|
||||
required: false
|
||||
default: "latest"
|
||||
|
||||
env:
|
||||
DOCKERHUB_REGISTRY: docker.io
|
||||
IMAGE_NAME: hrms-api-leave
|
||||
|
||||
jobs:
|
||||
release-to-dockerhub:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set output tags
|
||||
id: vars
|
||||
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Generate version
|
||||
id: gen_ver
|
||||
run: |
|
||||
if [[ $GITHUB_REF == 'refs/tags/'* ]]; then
|
||||
IMAGE_VER=${{ steps.vars.outputs.tag }}
|
||||
elif [[ $GITHUB_REF == 'refs/heads/'* ]]; then
|
||||
BRANCH_NAME=${GITHUB_REF#refs/heads/}
|
||||
IMAGE_VER="${BRANCH_NAME}-latest"
|
||||
else
|
||||
IMAGE_VER=${{ github.event.inputs.IMAGE_VER }}
|
||||
fi
|
||||
if [[ $IMAGE_VER == '' ]]; then
|
||||
IMAGE_VER='test-vBeta'
|
||||
fi
|
||||
echo "image_ver=${IMAGE_VER}" >> $GITHUB_OUTPUT
|
||||
echo "Generated version: ${IMAGE_VER}"
|
||||
|
||||
- name: Display version
|
||||
run: |
|
||||
echo "Git Ref: $GITHUB_REF"
|
||||
echo "Image Version: ${{ steps.gen_ver.outputs.image_ver }}"
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{env.DOCKERHUB_REGISTRY}}
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Extract metadata for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}
|
||||
tags: |
|
||||
type=ref,event=tag
|
||||
type=ref,event=branch
|
||||
type=raw,value=${{ steps.gen_ver.outputs.image_ver }}
|
||||
type=raw,value=latest,enable={{is_default_branch}}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: BMA.EHR.Leave/Dockerfile
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: |
|
||||
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ steps.gen_ver.outputs.image_ver }}
|
||||
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
||||
- name: Image digest
|
||||
run: echo "Image pushed with digest ${{ steps.build.outputs.digest }}"
|
||||
72
.github/workflows/dockerhub-release-placement.yaml
vendored
Normal file
72
.github/workflows/dockerhub-release-placement.yaml
vendored
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
name: DockerHub Release - Placement Service
|
||||
run-name: DockerHub Release - Placement Service by ${{ github.actor }}
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "placement-[0-9]+.[0-9]+.[0-9]+"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
IMAGE_VER:
|
||||
description: "Image version (e.g., latest, v1.0.0)"
|
||||
required: false
|
||||
default: "latest"
|
||||
|
||||
env:
|
||||
DOCKERHUB_REGISTRY: docker.io
|
||||
IMAGE_NAME: hrms-api-placement
|
||||
|
||||
jobs:
|
||||
release-to-dockerhub:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set output tags
|
||||
id: vars
|
||||
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Generate version
|
||||
id: gen_ver
|
||||
run: |
|
||||
if [[ $GITHUB_REF == 'refs/tags/'* ]]; then
|
||||
IMAGE_VER=${{ steps.vars.outputs.tag }}
|
||||
else
|
||||
IMAGE_VER=${{ github.event.inputs.IMAGE_VER }}
|
||||
fi
|
||||
if [[ $IMAGE_VER == '' ]]; then
|
||||
IMAGE_VER='test-vBeta'
|
||||
fi
|
||||
echo "image_ver=${IMAGE_VER}" >> $GITHUB_OUTPUT
|
||||
echo "Generated version: ${IMAGE_VER}"
|
||||
|
||||
- name: Display version
|
||||
run: |
|
||||
echo "Git Ref: $GITHUB_REF"
|
||||
echo "Image Version: ${{ steps.gen_ver.outputs.image_ver }}"
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{env.DOCKERHUB_REGISTRY}}
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: BMA.EHR.Placement.Service/Dockerfile
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: |
|
||||
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ steps.gen_ver.outputs.image_ver }}
|
||||
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest
|
||||
labels: |
|
||||
org.opencontainers.image.title=BMA EHR Placement Service
|
||||
org.opencontainers.image.description=HRMS Placement API Service
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
72
.github/workflows/dockerhub-release-report.yaml
vendored
Normal file
72
.github/workflows/dockerhub-release-report.yaml
vendored
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
name: DockerHub Release - Report Service
|
||||
run-name: DockerHub Release - Report Service by ${{ github.actor }}
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "report-[0-9]+.[0-9]+.[0-9]+"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
IMAGE_VER:
|
||||
description: "Image version (e.g., latest, v1.0.0)"
|
||||
required: false
|
||||
default: "latest"
|
||||
|
||||
env:
|
||||
DOCKERHUB_REGISTRY: docker.io
|
||||
IMAGE_NAME: hrms-api-report
|
||||
|
||||
jobs:
|
||||
release-to-dockerhub:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set output tags
|
||||
id: vars
|
||||
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Generate version
|
||||
id: gen_ver
|
||||
run: |
|
||||
if [[ $GITHUB_REF == 'refs/tags/'* ]]; then
|
||||
IMAGE_VER=${{ steps.vars.outputs.tag }}
|
||||
else
|
||||
IMAGE_VER=${{ github.event.inputs.IMAGE_VER }}
|
||||
fi
|
||||
if [[ $IMAGE_VER == '' ]]; then
|
||||
IMAGE_VER='test-vBeta'
|
||||
fi
|
||||
echo "image_ver=${IMAGE_VER}" >> $GITHUB_OUTPUT
|
||||
echo "Generated version: ${IMAGE_VER}"
|
||||
|
||||
- name: Display version
|
||||
run: |
|
||||
echo "Git Ref: $GITHUB_REF"
|
||||
echo "Image Version: ${{ steps.gen_ver.outputs.image_ver }}"
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{env.DOCKERHUB_REGISTRY}}
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: BMA.EHR.Report.Service/Dockerfile
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: |
|
||||
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ steps.gen_ver.outputs.image_ver }}
|
||||
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest
|
||||
labels: |
|
||||
org.opencontainers.image.title=BMA EHR Report Service
|
||||
org.opencontainers.image.description=HRMS Report API Service
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
72
.github/workflows/dockerhub-release-retirement.yaml
vendored
Normal file
72
.github/workflows/dockerhub-release-retirement.yaml
vendored
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
name: DockerHub Release - Retirement Service
|
||||
run-name: DockerHub Release - Retirement Service by ${{ github.actor }}
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "retirement-[0-9]+.[0-9]+.[0-9]+"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
IMAGE_VER:
|
||||
description: "Image version (e.g., latest, v1.0.0)"
|
||||
required: false
|
||||
default: "latest"
|
||||
|
||||
env:
|
||||
DOCKERHUB_REGISTRY: docker.io
|
||||
IMAGE_NAME: hrms-api-retirement
|
||||
|
||||
jobs:
|
||||
release-to-dockerhub:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set output tags
|
||||
id: vars
|
||||
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Generate version
|
||||
id: gen_ver
|
||||
run: |
|
||||
if [[ $GITHUB_REF == 'refs/tags/'* ]]; then
|
||||
IMAGE_VER=${{ steps.vars.outputs.tag }}
|
||||
else
|
||||
IMAGE_VER=${{ github.event.inputs.IMAGE_VER }}
|
||||
fi
|
||||
if [[ $IMAGE_VER == '' ]]; then
|
||||
IMAGE_VER='test-vBeta'
|
||||
fi
|
||||
echo "image_ver=${IMAGE_VER}" >> $GITHUB_OUTPUT
|
||||
echo "Generated version: ${IMAGE_VER}"
|
||||
|
||||
- name: Display version
|
||||
run: |
|
||||
echo "Git Ref: $GITHUB_REF"
|
||||
echo "Image Version: ${{ steps.gen_ver.outputs.image_ver }}"
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{env.DOCKERHUB_REGISTRY}}
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: BMA.EHR.Retirement.Service/Dockerfile
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: |
|
||||
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ steps.gen_ver.outputs.image_ver }}
|
||||
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest
|
||||
labels: |
|
||||
org.opencontainers.image.title=BMA EHR Retirement Service
|
||||
org.opencontainers.image.description=HRMS Retirement API Service
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
6
.github/workflows/release_Retirement.yaml
vendored
6
.github/workflows/release_Retirement.yaml
vendored
|
|
@ -1,9 +1,9 @@
|
|||
name: release-dev
|
||||
run-name: release-dev ${{ github.actor }}
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "retirement-[0-9]+.[0-9]+.[0-9]+"
|
||||
# push:
|
||||
# tags:
|
||||
# - "retirement-[0-9]+.[0-9]+.[0-9]+"
|
||||
workflow_dispatch:
|
||||
env:
|
||||
REGISTRY: docker.frappet.com
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
name: release-dev
|
||||
run-name: release-dev ${{ github.actor }}
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "consumer-[0-9]+.[0-9]+.[0-9]+"
|
||||
# push:
|
||||
# tags:
|
||||
# - "consumer-[0-9]+.[0-9]+.[0-9]+"
|
||||
workflow_dispatch:
|
||||
env:
|
||||
REGISTRY: docker.frappet.com
|
||||
|
|
|
|||
6
.github/workflows/release_command.yaml
vendored
6
.github/workflows/release_command.yaml
vendored
|
|
@ -1,9 +1,9 @@
|
|||
name: release-dev
|
||||
run-name: release-dev ${{ github.actor }}
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "command-[0-9]+.[0-9]+.[0-9]+"
|
||||
# push:
|
||||
# tags:
|
||||
# - "command-[0-9]+.[0-9]+.[0-9]+"
|
||||
workflow_dispatch:
|
||||
env:
|
||||
REGISTRY: docker.frappet.com
|
||||
|
|
|
|||
6
.github/workflows/release_discipline.yaml
vendored
6
.github/workflows/release_discipline.yaml
vendored
|
|
@ -1,9 +1,9 @@
|
|||
name: release-dev
|
||||
run-name: release-dev ${{ github.actor }}
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "discipline-[0-9]+.[0-9]+.[0-9]+"
|
||||
# push:
|
||||
# tags:
|
||||
# - "discipline-[0-9]+.[0-9]+.[0-9]+"
|
||||
workflow_dispatch:
|
||||
env:
|
||||
REGISTRY: docker.frappet.com
|
||||
|
|
|
|||
6
.github/workflows/release_insignia.yaml
vendored
6
.github/workflows/release_insignia.yaml
vendored
|
|
@ -1,9 +1,9 @@
|
|||
name: release-dev
|
||||
run-name: release-dev ${{ github.actor }}
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "insignia-[0-9]+.[0-9]+.[0-9]+"
|
||||
# push:
|
||||
# tags:
|
||||
# - "insignia-[0-9]+.[0-9]+.[0-9]+"
|
||||
workflow_dispatch:
|
||||
env:
|
||||
REGISTRY: docker.frappet.com
|
||||
|
|
|
|||
6
.github/workflows/release_leave.yaml
vendored
6
.github/workflows/release_leave.yaml
vendored
|
|
@ -1,9 +1,9 @@
|
|||
name: release-dev
|
||||
run-name: release-dev ${{ github.actor }}
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "leave-[0-9]+.[0-9]+.[0-9]+"
|
||||
# push:
|
||||
# tags:
|
||||
# - "leave-[0-9]+.[0-9]+.[0-9]+"
|
||||
workflow_dispatch:
|
||||
env:
|
||||
REGISTRY: docker.frappet.com
|
||||
|
|
|
|||
6
.github/workflows/release_placement.yaml
vendored
6
.github/workflows/release_placement.yaml
vendored
|
|
@ -1,9 +1,9 @@
|
|||
name: release-dev
|
||||
run-name: release-dev ${{ github.actor }}
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "placement-[0-9]+.[0-9]+.[0-9]+"
|
||||
# push:
|
||||
# tags:
|
||||
# - "placement-[0-9]+.[0-9]+.[0-9]+"
|
||||
workflow_dispatch:
|
||||
env:
|
||||
REGISTRY: docker.frappet.com
|
||||
|
|
|
|||
196
.github/workflows/release_report.yaml
vendored
196
.github/workflows/release_report.yaml
vendored
|
|
@ -1,107 +1,107 @@
|
|||
name: release-dev
|
||||
run-name: release-dev ${{ github.actor }}
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "reportv2-[0-9]+.[0-9]+.[0-9]+"
|
||||
# push:
|
||||
# tags:
|
||||
# - "reportv2-[0-9]+.[0-9]+.[0-9]+"
|
||||
workflow_dispatch:
|
||||
env:
|
||||
REGISTRY: docker.frappet.com
|
||||
IMAGE_NAME: ehr/bma-ehr-report-v2-service
|
||||
DEPLOY_HOST: frappet.com
|
||||
DEPLOY_PORT: 10102
|
||||
# COMPOSE_PATH: /home/frappet/docker/bma-ehr
|
||||
COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-report-v2
|
||||
TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0
|
||||
REGISTRY: docker.frappet.com
|
||||
IMAGE_NAME: ehr/bma-ehr-report-v2-service
|
||||
DEPLOY_HOST: frappet.com
|
||||
DEPLOY_PORT: 10102
|
||||
# COMPOSE_PATH: /home/frappet/docker/bma-ehr
|
||||
COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-report-v2
|
||||
TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0
|
||||
|
||||
jobs:
|
||||
# act workflow_dispatch -W .github/workflows/release_report.yaml --input IMAGE_VER=latest -s DOCKER_USER=admin -s DOCKER_PASS=FPTadmin2357 -s SSH_PASSWORD=FPTadmin2357
|
||||
release-dev:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set output tags
|
||||
id: vars
|
||||
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
|
||||
- name: Gen Version
|
||||
id: gen_ver
|
||||
run: |
|
||||
if [[ $GITHUB_REF == 'refs/tags/'* ]]; then
|
||||
IMAGE_VER=${{ steps.vars.outputs.tag }}
|
||||
else
|
||||
IMAGE_VER=${{ github.event.inputs.IMAGE_VER }}
|
||||
fi
|
||||
if [[ $IMAGE_VER == '' ]]; then
|
||||
IMAGE_VER='test-vBeta'
|
||||
fi
|
||||
echo '::set-output name=image_ver::'$IMAGE_VER
|
||||
- name: Check Version
|
||||
run: |
|
||||
echo $GITHUB_REF
|
||||
echo ${{ steps.gen_ver.outputs.image_ver }}
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Login in to registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ${{env.REGISTRY}}
|
||||
username: ${{secrets.DOCKER_USER}}
|
||||
password: ${{secrets.DOCKER_PASS}}
|
||||
- name: Build and load local docker image
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64
|
||||
file: BMA.EHR.Report.Service/Dockerfile
|
||||
push: true
|
||||
tags: ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:${{ steps.gen_ver.outputs.image_ver }},${{env.REGISTRY}}/${{env.IMAGE_NAME}}:latest
|
||||
# act workflow_dispatch -W .github/workflows/release_report.yaml --input IMAGE_VER=latest -s DOCKER_USER=admin -s DOCKER_PASS=FPTadmin2357 -s SSH_PASSWORD=FPTadmin2357
|
||||
release-dev:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set output tags
|
||||
id: vars
|
||||
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
|
||||
- name: Gen Version
|
||||
id: gen_ver
|
||||
run: |
|
||||
if [[ $GITHUB_REF == 'refs/tags/'* ]]; then
|
||||
IMAGE_VER=${{ steps.vars.outputs.tag }}
|
||||
else
|
||||
IMAGE_VER=${{ github.event.inputs.IMAGE_VER }}
|
||||
fi
|
||||
if [[ $IMAGE_VER == '' ]]; then
|
||||
IMAGE_VER='test-vBeta'
|
||||
fi
|
||||
echo '::set-output name=image_ver::'$IMAGE_VER
|
||||
- name: Check Version
|
||||
run: |
|
||||
echo $GITHUB_REF
|
||||
echo ${{ steps.gen_ver.outputs.image_ver }}
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Login in to registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ${{env.REGISTRY}}
|
||||
username: ${{secrets.DOCKER_USER}}
|
||||
password: ${{secrets.DOCKER_PASS}}
|
||||
- name: Build and load local docker image
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64
|
||||
file: BMA.EHR.Report.Service/Dockerfile
|
||||
push: true
|
||||
tags: ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:${{ steps.gen_ver.outputs.image_ver }},${{env.REGISTRY}}/${{env.IMAGE_NAME}}:latest
|
||||
|
||||
- name: Reload docker compose
|
||||
uses: appleboy/ssh-action@v0.1.8
|
||||
with:
|
||||
host: ${{env.DEPLOY_HOST}}
|
||||
username: frappet
|
||||
password: ${{ secrets.SSH_PASSWORD }}
|
||||
port: ${{env.DEPLOY_PORT}}
|
||||
script: |
|
||||
cd "${{env.COMPOSE_PATH}}"
|
||||
docker compose pull
|
||||
docker compose up -d
|
||||
echo "${{ steps.gen_ver.outputs.image_ver }}"> success
|
||||
- name: Notify Discord Success
|
||||
if: success()
|
||||
run: |
|
||||
curl -H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
-d '{
|
||||
"embeds": [{
|
||||
"title": "✅ Deployment Success!",
|
||||
"description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Deployed by: `${{github.actor}}`",
|
||||
"color": 3066993,
|
||||
"footer": {
|
||||
"text": "Release Notification",
|
||||
"icon_url": "https://example.com/success-icon.png"
|
||||
},
|
||||
"timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
||||
}]
|
||||
}' \
|
||||
${{ secrets.DISCORD_WEBHOOK }}
|
||||
- name: Reload docker compose
|
||||
uses: appleboy/ssh-action@v0.1.8
|
||||
with:
|
||||
host: ${{env.DEPLOY_HOST}}
|
||||
username: frappet
|
||||
password: ${{ secrets.SSH_PASSWORD }}
|
||||
port: ${{env.DEPLOY_PORT}}
|
||||
script: |
|
||||
cd "${{env.COMPOSE_PATH}}"
|
||||
docker compose pull
|
||||
docker compose up -d
|
||||
echo "${{ steps.gen_ver.outputs.image_ver }}"> success
|
||||
- name: Notify Discord Success
|
||||
if: success()
|
||||
run: |
|
||||
curl -H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
-d '{
|
||||
"embeds": [{
|
||||
"title": "✅ Deployment Success!",
|
||||
"description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Deployed by: `${{github.actor}}`",
|
||||
"color": 3066993,
|
||||
"footer": {
|
||||
"text": "Release Notification",
|
||||
"icon_url": "https://example.com/success-icon.png"
|
||||
},
|
||||
"timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
||||
}]
|
||||
}' \
|
||||
${{ secrets.DISCORD_WEBHOOK }}
|
||||
|
||||
- name: Notify Discord Failure
|
||||
if: failure()
|
||||
run: |
|
||||
curl -H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
-d '{
|
||||
"embeds": [{
|
||||
"title": "❌ Deployment Failed!",
|
||||
"description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Attempted by: `${{github.actor}}`",
|
||||
"color": 15158332,
|
||||
"footer": {
|
||||
"text": "Release Notification",
|
||||
"icon_url": "https://example.com/failure-icon.png"
|
||||
},
|
||||
"timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
||||
}]
|
||||
}' \
|
||||
${{ secrets.DISCORD_WEBHOOK }}
|
||||
- name: Notify Discord Failure
|
||||
if: failure()
|
||||
run: |
|
||||
curl -H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
-d '{
|
||||
"embeds": [{
|
||||
"title": "❌ Deployment Failed!",
|
||||
"description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Attempted by: `${{github.actor}}`",
|
||||
"color": 15158332,
|
||||
"footer": {
|
||||
"text": "Release Notification",
|
||||
"icon_url": "https://example.com/failure-icon.png"
|
||||
},
|
||||
"timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
||||
}]
|
||||
}' \
|
||||
${{ secrets.DISCORD_WEBHOOK }}
|
||||
|
|
|
|||
|
|
@ -35,24 +35,44 @@ public class InsigniaRequestProcessService : BackgroundService
|
|||
|
||||
#endregion
|
||||
|
||||
public override async Task StartAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
var client = new SocketIO("wss://hrmsbkk.case-collection.com",
|
||||
new SocketIOOptions
|
||||
{
|
||||
// เพิ่ม token ใน handshake.auth
|
||||
Auth = new { token = AccessToken ?? "" },
|
||||
Path = "/api/v1/org-socket"
|
||||
});
|
||||
|
||||
client.OnConnected += async (sender, e) =>
|
||||
{
|
||||
Console.WriteLine("Connected to Socket.IO server");
|
||||
await client.EmitAsync("eventName", "Hello from .NET client");
|
||||
};
|
||||
|
||||
await client.ConnectAsync();
|
||||
|
||||
await base.StartAsync(cancellationToken);
|
||||
}
|
||||
//public override async Task StartAsync(CancellationToken cancellationToken)
|
||||
//{
|
||||
//var client = new SocketIO("https://bma-ehr.frappet.synology.me/api/v1/org-socket",
|
||||
// new SocketIOOptions
|
||||
// {
|
||||
// // เพิ่ม token ใน handshake.auth
|
||||
// Auth = new { token = AccessToken ?? "" }
|
||||
// });
|
||||
//var client = new SocketIO("https://bma-ehr.frappet.synology.me/api/v1/org-socket",
|
||||
// new SocketIOOptions
|
||||
// {
|
||||
// // เพิ่ม token ใน handshake.auth
|
||||
// Auth = new { token = AccessToken ?? "" }
|
||||
// });
|
||||
|
||||
//client.OnConnected += async (sender, e) =>
|
||||
//{
|
||||
// Console.WriteLine("Connected to Socket.IO server");
|
||||
// await client.EmitAsync("eventName", "Hello from .NET client");
|
||||
//};
|
||||
//client.OnConnected += async (sender, e) =>
|
||||
//{
|
||||
// Console.WriteLine("Connected to Socket.IO server");
|
||||
// await client.EmitAsync("eventName", "Hello from .NET client");
|
||||
//};
|
||||
|
||||
//await client.ConnectAsync();
|
||||
//await client.ConnectAsync();
|
||||
|
||||
//await base.StartAsync(cancellationToken);
|
||||
//await base.StartAsync(cancellationToken);
|
||||
//}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -23,13 +23,17 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
private readonly IConfiguration _configuration;
|
||||
private readonly PermissionRepository _permission;
|
||||
|
||||
public RetireReportController(RetireReportRepository service, IWebHostEnvironment hostingEnvironment, IConfiguration configuration, PermissionRepository permission)
|
||||
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||
|
||||
public RetireReportController(RetireReportRepository service, IWebHostEnvironment hostingEnvironment, IConfiguration configuration, PermissionRepository permission, IHttpContextAccessor httpContextAccessor)
|
||||
{
|
||||
_service = service;
|
||||
_hostingEnvironment = hostingEnvironment;
|
||||
_configuration = configuration;
|
||||
_permission = permission;
|
||||
_httpContextAccessor = httpContextAccessor;
|
||||
}
|
||||
private string? AccessToken => _httpContextAccessor?.HttpContext?.Request.Headers["Authorization"];
|
||||
|
||||
#region 31-ประกาศเกษียณข้าราชการ & 32-ประกาศเกษียณลูกจ้างประจำ
|
||||
/// <summary>
|
||||
|
|
@ -44,7 +48,7 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
[HttpGet("{exportType}/{Id}")]
|
||||
public async Task<ActionResult<ResponseObject>> GetProfileRetirement([FromRoute] Guid Id, string exportType = "pdf")
|
||||
{
|
||||
var retire = await _service.GetProfileRetirementdAsync(Id,token);
|
||||
var retire = await _service.GetProfileRetirementdAsync(Id,AccessToken);
|
||||
if (retire != null)
|
||||
{
|
||||
var reportfile = string.Empty;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue