This commit is contained in:
master of disaster
2026-06-12 10:21:54 +02:00
parent ec4ceadd5d
commit d4842867b2

View File

@@ -42,6 +42,10 @@ on:
secrets: secrets:
TOKEN: TOKEN:
required: true required: true
TELEGRAM_BOT_TOKEN:
required: false
TELEGRAM_CHAT_ID:
required: false
# Optional — override default REGISTRY_USER/REGISTRY_PASSWORD # Optional — override default REGISTRY_USER/REGISTRY_PASSWORD
REGISTRY_USER_OVERRIDE: REGISTRY_USER_OVERRIDE:
required: false required: false
@@ -113,7 +117,6 @@ jobs:
- name: 🔨 Build + Push Image - name: 🔨 Build + Push Image
run: | run: |
# Build extra destinations
DESTINATIONS="--destination ${{ steps.meta.outputs.tag_latest }} \ DESTINATIONS="--destination ${{ steps.meta.outputs.tag_latest }} \
--destination ${{ steps.meta.outputs.tag_sha }}" --destination ${{ steps.meta.outputs.tag_sha }}"
@@ -126,7 +129,8 @@ jobs:
NO_CACHE="--no-push-cache --cache=false" NO_CACHE="--no-push-cache --cache=false"
fi fi
/kaniko/executor \ # Kaniko executor is in /tools (copied by initContainer)
/tools/executor \
--context=dir:///workspace/${{ inputs.context_path }} \ --context=dir:///workspace/${{ inputs.context_path }} \
--dockerfile=/workspace/${{ inputs.dockerfile_path }} \ --dockerfile=/workspace/${{ inputs.dockerfile_path }} \
${DESTINATIONS} \ ${DESTINATIONS} \
@@ -141,8 +145,7 @@ jobs:
STATUS="${{ job.status }}" STATUS="${{ job.status }}"
IMAGE="${{ steps.meta.outputs.tag_latest }}" IMAGE="${{ steps.meta.outputs.tag_latest }}"
SHA="${{ steps.meta.outputs.short_sha }}" SHA="${{ steps.meta.outputs.short_sha }}"
TEXT="🏗️ Image Build: ${IMAGE}%0ASHA: ${SHA}%0AStatus: ${STATUS}" # Use wget — available in gitea/act_runner base image (busybox)
curl -s -X POST \ wget -q -O- \
"https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \ --post-data="chat_id=${{ secrets.TELEGRAM_CHAT_ID }}&text=🏗️ Build: ${IMAGE} SHA:${SHA} Status:${STATUS}" \
-d "chat_id=${{ secrets.TELEGRAM_CHAT_ID }}" \ "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" || true
-d "text=${TEXT}"