From 3298d1ac7b156e4e4732b48b98719bab715f429e Mon Sep 17 00:00:00 2001 From: Marcel Kuhmann Date: Sun, 21 Jan 2024 13:40:35 +0100 Subject: [PATCH] setup upstream workflow --- .github/workflows/upstream-check.yml | 48 ++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/upstream-check.yml diff --git a/.github/workflows/upstream-check.yml b/.github/workflows/upstream-check.yml new file mode 100644 index 0000000..c4c3a89 --- /dev/null +++ b/.github/workflows/upstream-check.yml @@ -0,0 +1,48 @@ +name: Upstream + +on: + pull_request: + types: [ opened, synchronize, reopened, ready_for_review ] + +jobs: + upstream_run: + name: ${{ matrix.repo }} (dry-run) + runs-on: ubuntu-latest + timeout-minutes: 10 + + concurrency: + group: upstream-check-${{github.event_name}}-${{ matrix.repo }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + + strategy: + fail-fast: false + matrix: + repo: + - 'redaxo/redaxo' + - 'yakamara/yform' + - 'yakamara/redaxo_yrewrite' + - 'yakamara/ycom' + + if: github.event.pull_request.draft == false + steps: + - uses: actions/checkout@v3 + with: + repository: ${{ matrix.repo }} + + - name: Setup PHP + id: setup-php + uses: shivammathur/setup-php@v2 + with: + php-version: 8.1 + coverage: none + + - name: set redaxo/php-cs-fixer-config to current branch + run: composer require redaxo/php-cs-fixer-config:dev-${{ github.head_ref }} --no-scripts --no-update + + - uses: "ramsey/composer-install@v2" + with: + dependency-versions: "highest" # to trigger "composer update" instead of "composer install" but limited to redaxo/php-cs-fixer-config updates only + composer-options: "redaxo/php-cs-fixer-config --prefer-dist --no-progress --with-all-dependencies" + + - name: run php-cs-fixer (dry-run) + run: php-cs-fixer fix -v --ansi --dry-run