From e1cd40a364417920c2e44063de6b4b0417006187 Mon Sep 17 00:00:00 2001 From: nextcloud-command Date: Sun, 17 May 2026 03:26:39 +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 | 33 +++++++++------ .github/workflows/psalm.yml | 42 ++++++++++--------- .github/workflows/sync-workflow-templates.yml | 3 +- 4 files changed, 51 insertions(+), 32 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..4b35dd4c --- /dev/null +++ b/.github/actions-lock.txt @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT +d86aa09feb6ce2ad244926aff7adcb36 lint-php.yml +a965b7d4820a97cc232a24f6caf90d95 psalm.yml +9dc6b717be0006fc7974a50351686fd7 sync-workflow-templates.yml diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml index ea018121..47e4dc4f 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 @@ -41,16 +49,17 @@ jobs: persist-credentials: false - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0 + uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.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..1784f416 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 - uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0 + - 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 # 2.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..93704ef3 100644 --- a/.github/workflows/sync-workflow-templates.yml +++ b/.github/workflows/sync-workflow-templates.yml @@ -26,6 +26,7 @@ jobs: matrix: branches: - ${{ github.event.repository.default_branch }} + - 'stable34' - 'stable33' - 'stable32' @@ -122,7 +123,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