chore(workflows): remove deprecated docker-publish-fast workflow and enhance docker-publish with bundle size check
This commit is contained in:
@@ -5,7 +5,9 @@ on:
|
||||
branches:
|
||||
- main
|
||||
- v4
|
||||
workflow_dispatch: # Ручной запуск из Gitea Actions
|
||||
- tabler
|
||||
- v3
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
lint-and-test:
|
||||
@@ -30,9 +32,19 @@ jobs:
|
||||
- name: Lint
|
||||
run: npm run lint
|
||||
|
||||
- name: Test (frontend build)
|
||||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
- name: Check bundle size
|
||||
run: |
|
||||
SIZE_BYTES=$(du -sb dist | cut -f1)
|
||||
SIZE_MB=$(awk "BEGIN {printf \"%.2f\", $SIZE_BYTES / 1048576}")
|
||||
echo "## Bundle size: ${SIZE_MB} MB" >> $GITHUB_STEP_SUMMARY
|
||||
if [ "$SIZE_BYTES" -gt 5242880 ]; then
|
||||
echo "::error::Bundle size (${SIZE_MB} MB) exceeds 5MB limit"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
needs: lint-and-test
|
||||
@@ -76,4 +88,4 @@ jobs:
|
||||
|
||||
- name: Trigger container update webhook
|
||||
run: |
|
||||
curl -X POST -sS --fail "${{ secrets.portainer_webhook }}"
|
||||
curl -X POST -sS --fail "${{ secrets.portainer_webhook }}"
|
||||
|
||||
Reference in New Issue
Block a user