change build to docker hub
This commit is contained in:
parent
d10c86e0cb
commit
ac6c898c24
16 changed files with 628 additions and 124 deletions
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
|
||||||
10
.github/workflows/dockerhub-release-leave.yaml
vendored
10
.github/workflows/dockerhub-release-leave.yaml
vendored
|
|
@ -4,15 +4,15 @@ on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- "leave-[0-9]+.[0-9]+.[0-9]+"
|
- "leave-[0-9]+.[0-9]+.[0-9]+"
|
||||||
branches:
|
# branches:
|
||||||
- main
|
# - main
|
||||||
- develop
|
# - develop
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
IMAGE_VER:
|
IMAGE_VER:
|
||||||
description: 'Image version (e.g., latest, v1.0.0)'
|
description: "Image version (e.g., latest, v1.0.0)"
|
||||||
required: false
|
required: false
|
||||||
default: 'latest'
|
default: "latest"
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOCKERHUB_REGISTRY: docker.io
|
DOCKERHUB_REGISTRY: docker.io
|
||||||
|
|
|
||||||
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
|
name: release-dev
|
||||||
run-name: release-dev ${{ github.actor }}
|
run-name: release-dev ${{ github.actor }}
|
||||||
on:
|
on:
|
||||||
push:
|
# push:
|
||||||
tags:
|
# tags:
|
||||||
- "retirement-[0-9]+.[0-9]+.[0-9]+"
|
# - "retirement-[0-9]+.[0-9]+.[0-9]+"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
env:
|
env:
|
||||||
REGISTRY: docker.frappet.com
|
REGISTRY: docker.frappet.com
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
name: release-dev
|
name: release-dev
|
||||||
run-name: release-dev ${{ github.actor }}
|
run-name: release-dev ${{ github.actor }}
|
||||||
on:
|
on:
|
||||||
push:
|
# push:
|
||||||
tags:
|
# tags:
|
||||||
- "consumer-[0-9]+.[0-9]+.[0-9]+"
|
# - "consumer-[0-9]+.[0-9]+.[0-9]+"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
env:
|
env:
|
||||||
REGISTRY: docker.frappet.com
|
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
|
name: release-dev
|
||||||
run-name: release-dev ${{ github.actor }}
|
run-name: release-dev ${{ github.actor }}
|
||||||
on:
|
on:
|
||||||
push:
|
# push:
|
||||||
tags:
|
# tags:
|
||||||
- "command-[0-9]+.[0-9]+.[0-9]+"
|
# - "command-[0-9]+.[0-9]+.[0-9]+"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
env:
|
env:
|
||||||
REGISTRY: docker.frappet.com
|
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
|
name: release-dev
|
||||||
run-name: release-dev ${{ github.actor }}
|
run-name: release-dev ${{ github.actor }}
|
||||||
on:
|
on:
|
||||||
push:
|
# push:
|
||||||
tags:
|
# tags:
|
||||||
- "discipline-[0-9]+.[0-9]+.[0-9]+"
|
# - "discipline-[0-9]+.[0-9]+.[0-9]+"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
env:
|
env:
|
||||||
REGISTRY: docker.frappet.com
|
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
|
name: release-dev
|
||||||
run-name: release-dev ${{ github.actor }}
|
run-name: release-dev ${{ github.actor }}
|
||||||
on:
|
on:
|
||||||
push:
|
# push:
|
||||||
tags:
|
# tags:
|
||||||
- "insignia-[0-9]+.[0-9]+.[0-9]+"
|
# - "insignia-[0-9]+.[0-9]+.[0-9]+"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
env:
|
env:
|
||||||
REGISTRY: docker.frappet.com
|
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
|
name: release-dev
|
||||||
run-name: release-dev ${{ github.actor }}
|
run-name: release-dev ${{ github.actor }}
|
||||||
on:
|
on:
|
||||||
push:
|
# push:
|
||||||
tags:
|
# tags:
|
||||||
- "leave-[0-9]+.[0-9]+.[0-9]+"
|
# - "leave-[0-9]+.[0-9]+.[0-9]+"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
env:
|
env:
|
||||||
REGISTRY: docker.frappet.com
|
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
|
name: release-dev
|
||||||
run-name: release-dev ${{ github.actor }}
|
run-name: release-dev ${{ github.actor }}
|
||||||
on:
|
on:
|
||||||
push:
|
# push:
|
||||||
tags:
|
# tags:
|
||||||
- "placement-[0-9]+.[0-9]+.[0-9]+"
|
# - "placement-[0-9]+.[0-9]+.[0-9]+"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
env:
|
env:
|
||||||
REGISTRY: docker.frappet.com
|
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
|
name: release-dev
|
||||||
run-name: release-dev ${{ github.actor }}
|
run-name: release-dev ${{ github.actor }}
|
||||||
on:
|
on:
|
||||||
push:
|
# push:
|
||||||
tags:
|
# tags:
|
||||||
- "reportv2-[0-9]+.[0-9]+.[0-9]+"
|
# - "reportv2-[0-9]+.[0-9]+.[0-9]+"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
env:
|
env:
|
||||||
REGISTRY: docker.frappet.com
|
REGISTRY: docker.frappet.com
|
||||||
IMAGE_NAME: ehr/bma-ehr-report-v2-service
|
IMAGE_NAME: ehr/bma-ehr-report-v2-service
|
||||||
DEPLOY_HOST: frappet.com
|
DEPLOY_HOST: frappet.com
|
||||||
DEPLOY_PORT: 10102
|
DEPLOY_PORT: 10102
|
||||||
# COMPOSE_PATH: /home/frappet/docker/bma-ehr
|
# COMPOSE_PATH: /home/frappet/docker/bma-ehr
|
||||||
COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-report-v2
|
COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-report-v2
|
||||||
TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0
|
TOKEN_LINE: uxuK5hDzS2DsoC5piJBrWRLiz8GgY7iMZZldOWsDDF0
|
||||||
|
|
||||||
jobs:
|
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
|
# 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:
|
release-dev:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Set output tags
|
- name: Set output tags
|
||||||
id: vars
|
id: vars
|
||||||
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
|
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
|
||||||
- name: Gen Version
|
- name: Gen Version
|
||||||
id: gen_ver
|
id: gen_ver
|
||||||
run: |
|
run: |
|
||||||
if [[ $GITHUB_REF == 'refs/tags/'* ]]; then
|
if [[ $GITHUB_REF == 'refs/tags/'* ]]; then
|
||||||
IMAGE_VER=${{ steps.vars.outputs.tag }}
|
IMAGE_VER=${{ steps.vars.outputs.tag }}
|
||||||
else
|
else
|
||||||
IMAGE_VER=${{ github.event.inputs.IMAGE_VER }}
|
IMAGE_VER=${{ github.event.inputs.IMAGE_VER }}
|
||||||
fi
|
fi
|
||||||
if [[ $IMAGE_VER == '' ]]; then
|
if [[ $IMAGE_VER == '' ]]; then
|
||||||
IMAGE_VER='test-vBeta'
|
IMAGE_VER='test-vBeta'
|
||||||
fi
|
fi
|
||||||
echo '::set-output name=image_ver::'$IMAGE_VER
|
echo '::set-output name=image_ver::'$IMAGE_VER
|
||||||
- name: Check Version
|
- name: Check Version
|
||||||
run: |
|
run: |
|
||||||
echo $GITHUB_REF
|
echo $GITHUB_REF
|
||||||
echo ${{ steps.gen_ver.outputs.image_ver }}
|
echo ${{ steps.gen_ver.outputs.image_ver }}
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
- name: Login in to registry
|
- name: Login in to registry
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
registry: ${{env.REGISTRY}}
|
registry: ${{env.REGISTRY}}
|
||||||
username: ${{secrets.DOCKER_USER}}
|
username: ${{secrets.DOCKER_USER}}
|
||||||
password: ${{secrets.DOCKER_PASS}}
|
password: ${{secrets.DOCKER_PASS}}
|
||||||
- name: Build and load local docker image
|
- name: Build and load local docker image
|
||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
file: BMA.EHR.Report.Service/Dockerfile
|
file: BMA.EHR.Report.Service/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
tags: ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:${{ steps.gen_ver.outputs.image_ver }},${{env.REGISTRY}}/${{env.IMAGE_NAME}}:latest
|
tags: ${{env.REGISTRY}}/${{env.IMAGE_NAME}}:${{ steps.gen_ver.outputs.image_ver }},${{env.REGISTRY}}/${{env.IMAGE_NAME}}:latest
|
||||||
|
|
||||||
- name: Reload docker compose
|
- name: Reload docker compose
|
||||||
uses: appleboy/ssh-action@v0.1.8
|
uses: appleboy/ssh-action@v0.1.8
|
||||||
with:
|
with:
|
||||||
host: ${{env.DEPLOY_HOST}}
|
host: ${{env.DEPLOY_HOST}}
|
||||||
username: frappet
|
username: frappet
|
||||||
password: ${{ secrets.SSH_PASSWORD }}
|
password: ${{ secrets.SSH_PASSWORD }}
|
||||||
port: ${{env.DEPLOY_PORT}}
|
port: ${{env.DEPLOY_PORT}}
|
||||||
script: |
|
script: |
|
||||||
cd "${{env.COMPOSE_PATH}}"
|
cd "${{env.COMPOSE_PATH}}"
|
||||||
docker compose pull
|
docker compose pull
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
echo "${{ steps.gen_ver.outputs.image_ver }}"> success
|
echo "${{ steps.gen_ver.outputs.image_ver }}"> success
|
||||||
- name: Notify Discord Success
|
- name: Notify Discord Success
|
||||||
if: success()
|
if: success()
|
||||||
run: |
|
run: |
|
||||||
curl -H "Content-Type: application/json" \
|
curl -H "Content-Type: application/json" \
|
||||||
-X POST \
|
-X POST \
|
||||||
-d '{
|
-d '{
|
||||||
"embeds": [{
|
"embeds": [{
|
||||||
"title": "✅ Deployment Success!",
|
"title": "✅ Deployment Success!",
|
||||||
"description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Deployed by: `${{github.actor}}`",
|
"description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Deployed by: `${{github.actor}}`",
|
||||||
"color": 3066993,
|
"color": 3066993,
|
||||||
"footer": {
|
"footer": {
|
||||||
"text": "Release Notification",
|
"text": "Release Notification",
|
||||||
"icon_url": "https://example.com/success-icon.png"
|
"icon_url": "https://example.com/success-icon.png"
|
||||||
},
|
},
|
||||||
"timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
"timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
||||||
}]
|
}]
|
||||||
}' \
|
}' \
|
||||||
${{ secrets.DISCORD_WEBHOOK }}
|
${{ secrets.DISCORD_WEBHOOK }}
|
||||||
|
|
||||||
- name: Notify Discord Failure
|
- name: Notify Discord Failure
|
||||||
if: failure()
|
if: failure()
|
||||||
run: |
|
run: |
|
||||||
curl -H "Content-Type: application/json" \
|
curl -H "Content-Type: application/json" \
|
||||||
-X POST \
|
-X POST \
|
||||||
-d '{
|
-d '{
|
||||||
"embeds": [{
|
"embeds": [{
|
||||||
"title": "❌ Deployment Failed!",
|
"title": "❌ Deployment Failed!",
|
||||||
"description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Attempted by: `${{github.actor}}`",
|
"description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Attempted by: `${{github.actor}}`",
|
||||||
"color": 15158332,
|
"color": 15158332,
|
||||||
"footer": {
|
"footer": {
|
||||||
"text": "Release Notification",
|
"text": "Release Notification",
|
||||||
"icon_url": "https://example.com/failure-icon.png"
|
"icon_url": "https://example.com/failure-icon.png"
|
||||||
},
|
},
|
||||||
"timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
"timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
|
||||||
}]
|
}]
|
||||||
}' \
|
}' \
|
||||||
${{ secrets.DISCORD_WEBHOOK }}
|
${{ secrets.DISCORD_WEBHOOK }}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue