fix(ci): dist один раз в test, artifact в push-image
npm ci/lint/build только в test; push-image берёт dist через upload/download-artifact. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+13
-10
@@ -25,7 +25,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
# Без cache: npm — act_runner v1.0.8 отменяет шаг на распаковке ~546MB (exit -1).
|
# Без cache: npm — act_runner отменяет шаг на распаковке ~546MB (exit -1).
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '20'
|
node-version: '20'
|
||||||
@@ -34,6 +34,14 @@ jobs:
|
|||||||
- run: npm run lint
|
- run: npm run lint
|
||||||
- run: npm run build
|
- run: npm run build
|
||||||
|
|
||||||
|
- name: Upload dist for docker job
|
||||||
|
if: github.event_name == 'push'
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: admin-ui-dist
|
||||||
|
path: dist/
|
||||||
|
retention-days: 1
|
||||||
|
|
||||||
- name: Mark test complete
|
- name: Mark test complete
|
||||||
id: mark_test
|
id: mark_test
|
||||||
if: success()
|
if: success()
|
||||||
@@ -49,14 +57,11 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- name: Download dist from test job
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
node-version: '20'
|
name: admin-ui-dist
|
||||||
|
path: dist
|
||||||
- name: Build frontend (dist for Dockerfile)
|
|
||||||
run: |
|
|
||||||
npm ci
|
|
||||||
npm run build
|
|
||||||
|
|
||||||
- name: Wait for Docker daemon
|
- name: Wait for Docker daemon
|
||||||
run: bash scripts/ensure-docker-daemon.sh 240
|
run: bash scripts/ensure-docker-daemon.sh 240
|
||||||
@@ -107,8 +112,6 @@ jobs:
|
|||||||
if: success()
|
if: success()
|
||||||
run: echo "ok=1" >> "$GITHUB_OUTPUT"
|
run: echo "ok=1" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
# act_runner v1.0.8: cancelled steps не валят job; gate-шаги if:always() не выполняются.
|
|
||||||
# Отдельный job проверяет outputs/result — workflow = failure, deploy-ift не стартует.
|
|
||||||
ci-done:
|
ci-done:
|
||||||
needs: [test, push-image]
|
needs: [test, push-image]
|
||||||
if: always()
|
if: always()
|
||||||
|
|||||||
Reference in New Issue
Block a user