Merge pull request #111 from phug-php/feature/multi-tester-3 #361
This file contains 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 | |
on: | |
push: | |
branches: [ '**' ] | |
pull_request: | |
branches: [ '**' ] | |
jobs: | |
split: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.2 | |
tools: composer:v2 | |
- name: Cache Composer packages | |
id: composer-cache | |
uses: actions/cache@v2 | |
with: | |
path: vendor | |
key: split-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
split- | |
- name: Install dependencies | |
if: steps.composer-cache.outputs.cache-hit != 'true' | |
run: | | |
test -f composer.json && mv composer.json composer.json.save -f | |
composer require phug/split --no-interaction | |
test -f composer.json.save && mv composer.json.save composer.json -f | |
- name: Split monorepository | |
run: vendor/bin/split update --git-credentials=$REPOSITORY_CREDENTIALS | |
env: | |
REPOSITORY_CREDENTIALS: ${{ secrets.REPOSITORY_CREDENTIALS }} |