Skip to content

Commit

Permalink
IBX-9627: [GHA] Created Rector PHP reusable workflow (#56)
Browse files Browse the repository at this point in the history
For more details see https://issues.ibexa.co/browse/IBX-9627 and #56

Key changes:

* [GHA] Created Rector PHP reusable workflow
  • Loading branch information
alongosz authored Feb 25, 2025
1 parent 2280d3a commit 11d7c7e
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/rector.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Rector PHP

on:
workflow_call:
secrets:
SATIS_NETWORK_KEY:
required: false
SATIS_NETWORK_TOKEN:
required: false
TRAVIS_GITHUB_TOKEN:
required: false
jobs:
rector:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup PHP Action
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}

- if: env.SATIS_NETWORK_KEY != ''
name: 'Add composer keys for private packagist'
run: |
composer config http-basic.updates.ibexa.co $SATIS_NETWORK_KEY $SATIS_NETWORK_TOKEN
composer config github-oauth.github.com $TRAVIS_GITHUB_TOKEN
env:
SATIS_NETWORK_KEY: ${{ secrets.SATIS_NETWORK_KEY }}
SATIS_NETWORK_TOKEN: ${{ secrets.SATIS_NETWORK_TOKEN }}
TRAVIS_GITHUB_TOKEN: ${{ secrets.TRAVIS_GITHUB_TOKEN }}

- name: 'Install Composer dependencies'
uses: ramsey/composer-install@v3
with:
dependency-versions: highest

- name: 'Run rector'
run: vendor/bin/rector process --dry-run --ansi

0 comments on commit 11d7c7e

Please sign in to comment.