fix build report
Some checks failed
DockerHub Release - Report Service / release-to-dockerhub (push) Failing after 10s
Some checks failed
DockerHub Release - Report Service / release-to-dockerhub (push) Failing after 10s
This commit is contained in:
parent
8c1a219084
commit
0690337422
1 changed files with 30 additions and 1 deletions
|
|
@ -14,6 +14,7 @@ on:
|
||||||
env:
|
env:
|
||||||
DOCKERHUB_REGISTRY: docker.io
|
DOCKERHUB_REGISTRY: docker.io
|
||||||
IMAGE_NAME: hrms-api-reportv2
|
IMAGE_NAME: hrms-api-reportv2
|
||||||
|
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release-to-dockerhub:
|
release-to-dockerhub:
|
||||||
|
|
@ -59,7 +60,7 @@ jobs:
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: BMA.EHR.ReportV2.Service/Dockerfile
|
file: BMA.EHR.Report.Service/Dockerfile
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
|
|
@ -70,3 +71,31 @@ jobs:
|
||||||
org.opencontainers.image.description=HRMS Report API Service
|
org.opencontainers.image.description=HRMS Report API Service
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
|
|
||||||
|
- name: Notify Discord on success
|
||||||
|
if: success()
|
||||||
|
env:
|
||||||
|
IMAGE_VER: ${{ steps.gen_ver.outputs.image_ver }}
|
||||||
|
run: |
|
||||||
|
TAG_INFO="Tag: ${IMAGE_VER:-unknown}"
|
||||||
|
REF_INFO="Ref: ${GITHUB_REF}"
|
||||||
|
ACTOR_INFO="Actor: ${GITHUB_ACTOR}"
|
||||||
|
MSG="✅ DockerHub release succeeded\n${TAG_INFO}\n${REF_INFO}\n${ACTOR_INFO}"
|
||||||
|
curl -s -H "Content-Type: application/json" \
|
||||||
|
-X POST \
|
||||||
|
-d "{\"content\":\"${MSG}\"}" \
|
||||||
|
"$DISCORD_WEBHOOK"
|
||||||
|
|
||||||
|
- name: Notify Discord on failure
|
||||||
|
if: failure()
|
||||||
|
env:
|
||||||
|
IMAGE_VER: ${{ steps.gen_ver.outputs.image_ver }}
|
||||||
|
run: |
|
||||||
|
TAG_INFO="Tag: ${IMAGE_VER:-unknown}"
|
||||||
|
REF_INFO="Ref: ${GITHUB_REF}"
|
||||||
|
ACTOR_INFO="Actor: ${GITHUB_ACTOR}"
|
||||||
|
MSG="❌ DockerHub release failed\n${TAG_INFO}\n${REF_INFO}\n${ACTOR_INFO}"
|
||||||
|
curl -s -H "Content-Type: application/json" \
|
||||||
|
-X POST \
|
||||||
|
-d "{\"content\":\"${MSG}\"}" \
|
||||||
|
"$DISCORD_WEBHOOK"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue