Skip to content

[3.0] 优化错误捕获处理 (#683) #1604

[3.0] 优化错误捕获处理 (#683)

[3.0] 优化错误捕获处理 (#683) #1604

name: split repository
on:
push:
branches:
- "3.0"
release:
types: [published]
jobs:
split-repository:
if: github.repository == 'imiphp/imi'
runs-on: ubuntu-20.04
env:
GITHUB_REF: ${{ github.ref }}
GITHUB_REPOSITORY: ${{ github.repository }}
steps:
- uses: ahmadnassri/action-workflow-queue@v1
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Private Key
env:
SSH_PRIVATE_KEY: ${{ secrets.IMI_PRIVATE_KEY }}
run: |
mkdir -p ~/.ssh
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
echo "StrictHostKeyChecking no" >> ~/.ssh/config
- name: Prepare
run: |
cd split-repository
composer update --no-interaction --prefer-dist --no-progress
- name: Split
if: github.event_name == 'push'
env:
IMI_ACCESS_TOKEN: ${{ secrets.IMI_ACCESS_TOKEN }}
SPLIT_CONFIG: ${{ secrets.SPLIT_CONFIG }}
run: |
cd split-repository
php -dxdebug.overload_var_dump=1 split.php
- name: Release components
if: github.event_name == 'release'
env:
IMI_ACCESS_TOKEN: ${{ secrets.IMI_ACCESS_TOKEN }}
run: |
cd split-repository
php -dxdebug.overload_var_dump=1 release.php