Merge pull request #1266 from nextcloud/feat/workflow-auto-update-lint-php.yml

Updating lint-php.yml workflow from template
This commit is contained in:
Simon L 2022-10-17 17:56:25 +02:00 committed by GitHub
commit 228d113bb0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,48 +1,55 @@
# This workflow is provided via the organization template repository # This workflow is provided via the organization template repository
# #
# https://github.com/nextcloud/.github # https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
name: Lint name: Lint
on: on:
pull_request: pull_request:
push: push:
branches: branches:
- main - main
- master
- stable* permissions:
contents: read
jobs:
php-lint: concurrency:
runs-on: ubuntu-latest group: lint-php-${{ github.head_ref || github.run_id }}
strategy: cancel-in-progress: true
matrix:
php-versions: ["8.0"] jobs:
php-lint:
name: php-lint runs-on: ubuntu-latest
strategy:
steps: matrix:
- name: Checkout php-versions: ["8.0"]
uses: actions/checkout@v3
name: php-lint
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2 steps:
with: - name: Checkout
php-version: ${{ matrix.php-versions }} uses: actions/checkout@v3
coverage: none
- name: Set up php ${{ matrix.php-versions }}
- name: Lint uses: shivammathur/setup-php@v2
run: cd php && composer run lint with:
php-version: ${{ matrix.php-versions }}
summary: coverage: none
runs-on: ubuntu-latest
needs: php-lint - name: Lint
run: cd php && composer run lint
if: always()
summary:
name: php-lint-summary permissions:
contents: none
steps: runs-on: ubuntu-latest
- name: Summary status needs: php-lint
run: if ${{ needs.php-lint.result != 'success' && needs.php-lint.result != 'skipped' }}; then exit 1; fi
if: always()
name: php-lint-summary
steps:
- name: Summary status
run: if ${{ needs.php-lint.result != 'success' && needs.php-lint.result != 'skipped' }}; then exit 1; fi