build report v2
Some checks failed
release-dev / release-dev (push) Has been cancelled

This commit is contained in:
kittapath 2025-01-07 22:01:41 +07:00
parent e170061cff
commit febc07623b

View file

@ -20,20 +20,22 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
# skip Set up QEMU because it fail on act and container - name: Set output tags
id: vars
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='${GITHUB_REF/refs\/tags\//}' 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: Test 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 }}
@ -66,21 +68,40 @@ jobs:
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
- uses: snow-actions/line-notify@v1.1.0 - name: Notify Discord Success
if: success() if: success()
with: run: |
access_token: ${{ env.TOKEN_LINE }} curl -H "Content-Type: application/json" \
message: | -X POST \
-Success✅✅✅ -d '{
Image: ${{env.IMAGE_NAME}} "embeds": [{
Version: ${{ github.event.inputs.IMAGE_VER }} "title": "✅ Deployment Success!",
By: ${{secrets.DOCKER_USER}} "description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Deployed by: `${{github.actor}}`",
- uses: snow-actions/line-notify@v1.1.0 "color": 3066993,
"footer": {
"text": "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() if: failure()
with: run: |
access_token: ${{ env.TOKEN_LINE }} curl -H "Content-Type: application/json" \
message: | -X POST \
-Failure❌❌❌ -d '{
Image: ${{env.IMAGE_NAME}} "embeds": [{
Version: ${{ github.event.inputs.IMAGE_VER }} "title": "❌ Deployment Failed!",
By: ${{secrets.DOCKER_USER}} "description": "**Details:**\n- Image: `${{env.IMAGE_NAME}}`\n- Version: `${{ steps.gen_ver.outputs.image_ver }}`\n- Attempted by: `${{github.actor}}`",
"color": 15158332,
"footer": {
"text": "Release Notification",
"icon_url": "https://example.com/failure-icon.png"
},
"timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"
}]
}' \
${{ secrets.DISCORD_WEBHOOK }}