From 9d14491d87b621da72732d46c62f05028afc3fdc Mon Sep 17 00:00:00 2001 From: Krzysztof Sikorski Date: Wed, 15 May 2024 23:24:45 +0200 Subject: [PATCH] feat[ci]: move the shared workflows to `config-ci` repository --- .../workflows/lint-composer-json-file.yaml | 13 ------- .github/workflows/lint-editorconfig.yaml | 10 ++---- .github/workflows/lint-php-coding-style.yaml | 35 ------------------- 3 files changed, 3 insertions(+), 55 deletions(-) delete mode 100644 .github/workflows/lint-composer-json-file.yaml delete mode 100644 .github/workflows/lint-php-coding-style.yaml diff --git a/.github/workflows/lint-composer-json-file.yaml b/.github/workflows/lint-composer-json-file.yaml deleted file mode 100644 index 3153a6a..0000000 --- a/.github/workflows/lint-composer-json-file.yaml +++ /dev/null @@ -1,13 +0,0 @@ -name: 'lint-composer-json-file' -on: - workflow_call: -permissions: - contents: 'read' -jobs: - main: - name: 'lint-composer-json-file' - runs-on: 'ubuntu-latest' - steps: - - uses: 'actions/checkout@v4' - - name: 'Execute validation command' - run: 'composer validate -vvv --strict --no-check-version' diff --git a/.github/workflows/lint-editorconfig.yaml b/.github/workflows/lint-editorconfig.yaml index bbb6bd7..c777e9a 100644 --- a/.github/workflows/lint-editorconfig.yaml +++ b/.github/workflows/lint-editorconfig.yaml @@ -1,13 +1,9 @@ name: 'lint-editorconfig' on: - workflow_call: + push: + pull_request: permissions: contents: 'read' jobs: main: - name: 'lint-editorconfig' - runs-on: 'ubuntu-latest' - steps: - - uses: 'actions/checkout@v4' - - name: 'Execute `editorconfig-checker` tool' - uses: 'docker://mstruebing/editorconfig-checker:v3.0.1' + uses: 'quintolin/config-ci/.github/workflows/lint-editorconfig.yaml@main' diff --git a/.github/workflows/lint-php-coding-style.yaml b/.github/workflows/lint-php-coding-style.yaml deleted file mode 100644 index 192f335..0000000 --- a/.github/workflows/lint-php-coding-style.yaml +++ /dev/null @@ -1,35 +0,0 @@ -name: 'lint-php-coding-style' -on: - workflow_call: -permissions: - contents: 'read' -jobs: - main: - name: 'lint-php-coding-style' - runs-on: 'ubuntu-latest' - steps: - - uses: 'actions/checkout@v4' - - name: 'Setup PHP' - uses: 'shivammathur/setup-php@v2' - with: - php-version: '8.3' - tools: 'friendsofphp/php-cs-fixer:3.54' - coverage: 'none' - env: - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' - - name: 'Get composer cache directory' - id: 'composer-cache' - run: 'echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT' - - name: 'Cache dependencies' - uses: 'actions/cache@v4' - with: - path: '${{ steps.composer-cache.outputs.dir }}' - key: > - ${{ runner.os }}-composer-${{ hashFiles('./composer.json') }} - restore-keys: '${{ runner.os }}-composer-' - - name: 'Disable "notify-on-install" feature' - run: 'composer config notify-on-install false' - - name: 'Install dependencies' - run: 'composer install --prefer-dist' - - name: 'Execute `php-cs-fixer` tool' - run: 'php-cs-fixer check -vvv --show-progress=dots'