[EasyAsync] Ability to disable specific Messenger's middleware (#1778) #2129
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 'Split Packages' | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| provide_packages_json: | |
| runs-on: ubuntu-latest | |
| env: | |
| PHP_EXTENSIONS: 'pdo_sqlite, openswoole, pkcs11' | |
| PHP_EXTENSIONS_CACHE_KEY: cache-extensions-pdo_sqlite-openswoole-pkcs11 | |
| steps: | |
| - | |
| name: Checkout | |
| uses: actions/checkout@v4 | |
| - | |
| name: 'Setup cache environment' | |
| id: cache-extensions | |
| uses: shivammathur/cache-extensions@v1 | |
| with: | |
| php-version: 8.2 | |
| extensions: '${{ env.PHP_EXTENSIONS }}' | |
| key: '${{ env.PHP_EXTENSIONS_CACHE_KEY }}' | |
| - | |
| name: 'Cache extensions' | |
| uses: actions/cache@v4 | |
| with: | |
| path: '${{ steps.cache-extensions.outputs.dir }}' | |
| key: '${{ steps.cache-extensions.outputs.key }}' | |
| - | |
| name: 'Setup PHP 8.2' | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: 8.2 | |
| coverage: none | |
| extensions: '${{ env.PHP_EXTENSIONS }}' | |
| - | |
| name: 'Install Composer dependencies' | |
| uses: ramsey/composer-install@v3 | |
| - | |
| id: output_data | |
| run: 'echo "matrix=$(bin/monorepo export-packages)" >> $GITHUB_OUTPUT' | |
| outputs: | |
| matrix: '${{ steps.output_data.outputs.matrix }}' | |
| split_packages: | |
| needs: provide_packages_json | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| mapping: '${{ fromJson(needs.provide_packages_json.outputs.matrix) }}' | |
| tag: | |
| - 6.19.4 | |
| name: 'Split ${{ matrix.mapping.dir }}' | |
| env: | |
| DIR: 'packages/${{ matrix.mapping.dir }}' | |
| TAG: '${{ matrix.tag }}' | |
| steps: | |
| - | |
| uses: actions/checkout@v4 | |
| - | |
| run: 'git fetch --prune --unshallow' | |
| - | |
| name: 'Remove Git Extra Header' | |
| run: 'git config -l | grep ''http\..*\.extraheader'' | cut -d= -f1 | xargs -L1 git config --unset-all' | |
| - | |
| name: 'Resolve current branch' | |
| id: branch_name | |
| run: 'echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT' | |
| - | |
| name: 'Add Repo Remote' | |
| run: 'git remote add split-remote https://natepage:${{ secrets.MONOREPO_GITHUB_TOKEN }}@github.com/eonx-com/${{ matrix.mapping.repo }}.git' | |
| - | |
| name: 'Split packages/${{ matrix.mapping.dir }}' | |
| env: | |
| BRANCH: '${{ steps.branch_name.outputs.branch }}' | |
| run: | | |
| git checkout -b "local-$BRANCH-checkout" "$BRANCH" | |
| git subtree split --prefix="packages/${{ matrix.mapping.dir }}" --branch="local-$BRANCH" "$BRANCH" | |
| git push --force split-remote local-$BRANCH:$BRANCH | |
| - | |
| if: "contains(github.event.head_commit.message, '[Release]')" | |
| name: 'Release eonx-com/${{ matrix.mapping.repo }}:${{ matrix.tag }}' | |
| shell: bash | |
| run: | | |
| if git rev-parse "$TAG" >/dev/null 2>&1; then | |
| git checkout -b "local-$TAG-checkout" "tags/$TAG" | |
| if [ -d "$DIR" ]; then | |
| git subtree split --prefix="$DIR" --branch="local-$TAG" "$TAG" | |
| git push --force split-remote local-$TAG:refs/tags/$TAG | |
| else | |
| echo "Dir \"$DIR\" does not exist for tag \"$TAG\"" | |
| fi | |
| else | |
| echo "Tag \"$TAG\" does not exist, skip" | |
| fi |