Merge branch 'develop'

This commit is contained in:
Methapon2001 2025-02-25 11:46:43 +07:00
commit c36d22356d

View file

@ -1,8 +1,8 @@
name: Gitea Action
run-name: Build ${{ github.actor }}
# Intended for local network use.
# Remote access is possible if the host has a public IP address.
# Intended for local gitea instance only.
on:
workflow_dispatch:
@ -11,7 +11,7 @@ env:
REGISTRY: ${{ vars.CONTAINER_REGISTRY }}
REGISTRY_USERNAME: ${{ vars.CONTAINER_REGISTRY_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.CONTAINER_REGISTRY_PASSWORD }}
CONTAINER_IMAGE_NAME: ${{ vars.CONTAINER_REGISTRY }}/${{ vars.CONTAINER_IMAGE_OWNER }}/${{ vars.CONTAINER_IMAGE_NAME }}:latest
jobs:
gitea-release:
runs-on: ubuntu-latest
@ -35,5 +35,39 @@ jobs:
with:
context: .
platforms: linux/amd64
tags: ${{ env.REGISTRY }}/chamomind/jws-backend:latest
tags: ${{ env.CONTAINER_IMAGE_NAME }}
push: true
- name: Notify Discord Success
if: success()
run: |
curl -H "Content-Type: application/json" -X POST \
-d '{
"embeds": [{
"title": "✅ Gitea Local Deployment Success!",
"description": "**Details:**\n- Image: `${{ env.CONTAINER_IMAGE_NAME }}`\n- Deployed by: `${{ github.actor }}`",
"color": 3066993,
"footer": {
"text": "Gitea Local 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": "❌ Gitea Local Deployment Failed!",
"description": "**Details:**\n- Image: `${{ env.CONTAINER_IMAGE_NAME }}`\n- Attempted by: `${{ github.actor }}`",
"color": 15158332,
"footer": {
"text": "Gitea Local Release Notification",
"icon_url": "https://example.com/failure-icon.png"
},
"timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
}]
}' \
${{ secrets.DISCORD_WEBHOOK }}