fix cicd
This commit is contained in:
parent
b91858f8a5
commit
e26fcdbd74
3 changed files with 17 additions and 19 deletions
|
|
@ -48,11 +48,3 @@ jobs:
|
|||
file: ./docker/Dockerfile
|
||||
tags: ${{ env.CONTAINER_IMAGE_NAME }}:latest,${{ env.CONTAINER_IMAGE_NAME }}:${{ env.IMAGE_VERSION }}
|
||||
push: true
|
||||
- name: Discord Notification
|
||||
if: always()
|
||||
run: |
|
||||
STATUS="${{ job.status == 'success' && '✅ Success' || '❌ Failed' }}"
|
||||
COLOR="${{ job.status == 'success' && '3066993' || '15158332' }}"
|
||||
curl -H "Content-Type: application/json" -X POST \
|
||||
-d "{\"embeds\":[{\"title\":\"$STATUS\",\"description\":\"Build Image: \`${{env.CONTAINER_IMAGE_NAME}}:${{env.IMAGE_VERSION}}\`\nBy: \`${{gitea.actor}}\`\",\"color\":$COLOR}]}" \
|
||||
${{ env.DISCORD_WEBHOOK }}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ jobs:
|
|||
ca=["/etc/ssl/certs/ca-certificates.crt"]
|
||||
- name: Tag Version
|
||||
run: |
|
||||
echo "IMAGE_VERSION=latest" >> $GITHUB_ENV
|
||||
echo "IMAGE_VERSION=latest" >> $FORGEJO_ENV
|
||||
- name: Login in to registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
|
|
@ -55,11 +55,25 @@ jobs:
|
|||
cd ~/repo
|
||||
./replace-env.sh APP_CHECKIN "${{ env.IMAGE_VERSION }}"
|
||||
./deploy.sh hrms-checkin
|
||||
|
||||
- name: Discord Notification
|
||||
if: always()
|
||||
run: |
|
||||
STATUS="${{ job.status == 'success' && '✅ Success' || '❌ Failed' }}"
|
||||
COLOR="${{ job.status == 'success' && '3066993' || '15158332' }}"
|
||||
curl -H "Content-Type: application/json" -X POST \
|
||||
-d "{\"embeds\":[{\"title\":\"$STATUS\",\"description\":\"Build & Deploy Image: \`${{env.CONTAINER_IMAGE_NAME}}:${{env.IMAGE_VERSION}}\`\nBy: \`${{gitea.actor}}\`\",\"color\":$COLOR}]}" \
|
||||
TIMESTAMP=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
||||
curl -H "Content-Type: application/json" \
|
||||
-X POST \
|
||||
-d "{
|
||||
\"embeds\": [{
|
||||
\"title\": \"$STATUS\",
|
||||
\"description\": \"**Build & Deploy:**\\n- Image: \`${{ env.CONTAINER_IMAGE_NAME }}\`\\n- Version: \`${{ env.IMAGE_VERSION }}\`\\n- Deployed by: \`${{ github.actor }}\`\",
|
||||
\"color\": $COLOR,
|
||||
\"footer\": {
|
||||
\"text\": \"Release Notification\",
|
||||
\"icon_url\": \"https://example.com/success-icon.png\"
|
||||
},
|
||||
\"timestamp\": \"$TIMESTAMP\"
|
||||
}]
|
||||
}" \
|
||||
${{ env.DISCORD_WEBHOOK }}
|
||||
|
|
|
|||
|
|
@ -27,11 +27,3 @@ jobs:
|
|||
cd ~/repo
|
||||
./replace-env.sh APP_CHECKIN "${{ inputs.version }}"
|
||||
./deploy.sh hrms-checkin
|
||||
- name: Discord Notification
|
||||
if: always()
|
||||
run: |
|
||||
STATUS="${{ job.status == 'success' && '✅ Success' || '❌ Failed' }}"
|
||||
COLOR="${{ job.status == 'success' && '3066993' || '15158332' }}"
|
||||
curl -H "Content-Type: application/json" -X POST \
|
||||
-d "{\"embeds\":[{\"title\":\"$STATUS\",\"description\":\"Deploy Image: \`${{env.CONTAINER_IMAGE_NAME}}:${{env.IMAGE_VERSION}}\`\nBy: \`${{gitea.actor}}\`\",\"color\":$COLOR}]}" \
|
||||
${{ env.DISCORD_WEBHOOK }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue