From be9d65fdec1bfdacc3f6a8b5d6ab6b0796c0df7e Mon Sep 17 00:00:00 2001 From: nextcloud-command Date: Sun, 3 May 2026 03:23:23 +0000 Subject: [PATCH] ci(actions): Update workflow templates from organization template repository Signed-off-by: GitHub --- .github/actions-lock.txt | 5 +++ .github/workflows/lint-php.yml | 31 +++++++++----- .github/workflows/psalm.yml | 40 ++++++++++--------- .github/workflows/sync-workflow-templates.yml | 2 +- 4 files changed, 48 insertions(+), 30 deletions(-) create mode 100644 .github/actions-lock.txt diff --git a/.github/actions-lock.txt b/.github/actions-lock.txt new file mode 100644 index 00000000..afb5622f --- /dev/null +++ b/.github/actions-lock.txt @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT +5dcc3187a9460cb62a455235cbdb3562 lint-php.yml +a6d8aa0050107ce4d8b6d166d25ca8aa psalm.yml +a4ad57688740c06ff327edaba69b2755 sync-workflow-templates.yml diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml index ea018121..d1eafea6 100644 --- a/.github/workflows/lint-php.yml +++ b/.github/workflows/lint-php.yml @@ -8,15 +8,7 @@ name: Lint php -on: - pull_request: - paths: - - 'php/**' - push: - branches: - - main - paths: - - 'php/**' +on: pull_request permissions: contents: read @@ -26,11 +18,27 @@ concurrency: cancel-in-progress: true jobs: + matrix: + runs-on: ubuntu-latest-low + outputs: + php-min: ${{ steps.versions.outputs.php-min }} + php-max: ${{ steps.versions.outputs.php-max }} + steps: + - name: Checkout app + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + - name: Get version matrix + id: versions + uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2 + php-lint: runs-on: ubuntu-latest + needs: matrix strategy: matrix: - php-versions: [ "8.5" ] + php-versions: ['${{ needs.matrix.outputs.php-min }}', '${{ needs.matrix.outputs.php-max }}'] name: php-lint @@ -44,13 +52,14 @@ jobs: uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0 with: php-version: ${{ matrix.php-versions }} + extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite coverage: none ini-file: development env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Lint - run: cd php && composer run lint + run: composer run lint summary: permissions: diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml index 60fc8a9f..4d4a4ec4 100644 --- a/.github/workflows/psalm.yml +++ b/.github/workflows/psalm.yml @@ -8,15 +8,7 @@ name: Static analysis -on: - pull_request: - paths: - - 'php/**' - push: - branches: - - main - paths: - - 'php/**' +on: pull_request concurrency: group: psalm-${{ github.head_ref || github.run_id }} @@ -36,20 +28,32 @@ jobs: with: persist-credentials: false - - name: Set up php + - name: Get php version + id: versions + uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2 + + - name: Check enforcement of minimum PHP version ${{ steps.versions.outputs.php-min }} in psalm.xml + run: grep 'phpVersion="${{ steps.versions.outputs.php-min }}' psalm.xml + + - name: Set up php${{ steps.versions.outputs.php-available }} uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0 with: - php-version: 8.5 - extensions: apcu + php-version: ${{ steps.versions.outputs.php-available }} + extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite coverage: none ini-file: development - + # Temporary workaround for missing pcntl_* in PHP 8.3 + ini-values: disable_functions= env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Install dependencies and run psalm + - name: Install dependencies run: | - set -x - cd php - composer install - composer run psalm + composer remove nextcloud/ocp --dev --no-scripts + composer i + + - name: Install nextcloud/ocp + run: composer require --dev nextcloud/ocp:dev-${{ steps.versions.outputs.branches-max }} --ignore-platform-reqs --with-dependencies + + - name: Run coding standards check + run: composer run psalm -- --threads=1 --monochrome --no-progress --output-format=github diff --git a/.github/workflows/sync-workflow-templates.yml b/.github/workflows/sync-workflow-templates.yml index c80d1944..8e99648a 100644 --- a/.github/workflows/sync-workflow-templates.yml +++ b/.github/workflows/sync-workflow-templates.yml @@ -122,7 +122,7 @@ jobs: - name: Create Pull Request uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 with: - token: ${{ secrets.COMMAND_BOT_WORKFLOWS }} # zizmor: ignore[secrets-outside-env] + token: ${{ secrets.COMMAND_BOT_WORKFLOWS }} commit-message: 'ci(actions): Update workflow templates from organization template repository' committer: GitHub author: nextcloud-command