Refactor CI workflow to create a single full-build.zip archive containing both api and web directories, with improved exclusion patterns. Update artifact upload step to use the new archive and maintain error handling for zip command.
All checks were successful
CI/CD / test-backend (pull_request) Successful in 7s
CI/CD / test-frontend (pull_request) Successful in 9s
CI/CD / create-archives (pull_request) Successful in 4s
CI/CD Pipeline / Overall Status ✅ All checks passed successfully
CI/CD / pr-status (pull_request) Successful in 1s
CI/CD / comment-on-failure (pull_request) Has been skipped
CI/CD / cleanup (pull_request) Successful in 1s
All checks were successful
CI/CD / test-backend (pull_request) Successful in 7s
CI/CD / test-frontend (pull_request) Successful in 9s
CI/CD / create-archives (pull_request) Successful in 4s
CI/CD Pipeline / Overall Status ✅ All checks passed successfully
CI/CD / pr-status (pull_request) Successful in 1s
CI/CD / comment-on-failure (pull_request) Has been skipped
CI/CD / cleanup (pull_request) Successful in 1s
This commit is contained in:
@@ -65,22 +65,22 @@ jobs:
|
|||||||
|
|
||||||
- name: Create archives
|
- name: Create archives
|
||||||
run: |
|
run: |
|
||||||
echo "Creating api.zip..."
|
echo "Creating full-build.zip with api and web..."
|
||||||
zip -r api.zip api/ -x "*.pyc" "*__pycache__*" "*.git*" "*.pytest_cache*" || echo "Warning: zip command failed for api"
|
# Создаём единый архив, включающий папки api и web, с исключениями
|
||||||
echo "Creating web.zip..."
|
zip -r full-build.zip api/ web/ \
|
||||||
zip -r web.zip web/ -x "node_modules/*" ".git*" "dist/*" "*.log" || echo "Warning: zip command failed for web"
|
-x "api/*.pyc" "api/*__pycache__*" "api/.git*" "api/.pytest_cache*" \
|
||||||
# Проверяем, что файлы созданы
|
-x "web/node_modules/*" "web/.git*" "web/dist/*" "web/*.log" \
|
||||||
ls -la api.zip web.zip
|
|| echo "Warning: zip command had issues"
|
||||||
|
# Проверяем, что файл создан
|
||||||
|
ls -la full-build.zip
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: build-artifacts-${{ github.run_id }}
|
name: build-artifacts-${{ github.run_id }}
|
||||||
path: |
|
path: full-build.zip
|
||||||
api.zip
|
|
||||||
web.zip
|
|
||||||
retention-days: 7
|
retention-days: 7
|
||||||
if-no-files-found: error # добавим, чтобы явно указывать, что файлы обязательны
|
if-no-files-found: error
|
||||||
|
|
||||||
# Явный статус для PR
|
# Явный статус для PR
|
||||||
pr-status:
|
pr-status:
|
||||||
|
|||||||
Reference in New Issue
Block a user