From aac49c5029cfbdd66e1601e7b0a09a1c06ab5960 Mon Sep 17 00:00:00 2001 From: nextcloud-command Date: Sun, 28 Jun 2026 03:30:19 +0000 Subject: [PATCH 1/2] ci(actions): Update workflow templates from organization template repository Signed-off-by: GitHub --- .github/actions-lock.txt | 6 +++ .github/workflows/block-merge-eol.yml | 2 +- .github/workflows/openapi.yml | 76 ++++++++++++++++++++++++--- 3 files changed, 76 insertions(+), 8 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 00000000000..24253242049 --- /dev/null +++ b/.github/actions-lock.txt @@ -0,0 +1,6 @@ +# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors +# SPDX-License-Identifier: MIT +9f2b534bea27e8ec2dda7c1d772a664b block-merge-eol.yml +2581a67c5bcdcd570427e6d51db767d7 fixup.yml +bf82c00cb71927a1bb0bb89c6b4dc5fd openapi.yml +3c4a096b3b7dbaef0f8e5190ffe13518 pr-feedback.yml diff --git a/.github/workflows/block-merge-eol.yml b/.github/workflows/block-merge-eol.yml index 3ea4d268d25..ab049456808 100644 --- a/.github/workflows/block-merge-eol.yml +++ b/.github/workflows/block-merge-eol.yml @@ -27,7 +27,7 @@ jobs: steps: - name: Set server major version environment - uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: github-token: ${{secrets.GITHUB_TOKEN}} script: | diff --git a/.github/workflows/openapi.yml b/.github/workflows/openapi.yml index 474ac014df6..f4dba566232 100644 --- a/.github/workflows/openapi.yml +++ b/.github/workflows/openapi.yml @@ -1,3 +1,12 @@ +# This workflow is provided via the organization template repository +# +# https://github.com/nextcloud/.github +# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization +# +# SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors +# SPDX-FileCopyrightText: 2024 Arthur Schiwon +# SPDX-License-Identifier: MIT + name: OpenAPI on: pull_request @@ -13,22 +22,75 @@ jobs: openapi: runs-on: ubuntu-latest + if: ${{ github.repository_owner != 'nextcloud-gmbh' }} + steps: - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false + - name: Get php version + id: php_versions + uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2 + - name: Set up php - uses: shivammathur/setup-php@20529878ed81ef8e78ddf08b480401e6101a850f # v2 + uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 with: - php-version: '8.1' - # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation - extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib + php-version: ${{ steps.php_versions.outputs.php-available }} + extensions: xml coverage: none ini-file: development env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Build using Makefile - run: make openapi-spec + - name: Check Typescript OpenApi types + id: check_typescript_openapi + uses: andstor/file-existence-action@558493d6c74bf472d87c84eab196434afc2fa029 # v3.1.0 + with: + files: "src/types/openapi/openapi*.ts" + + - name: Read package.json node and npm engines version + if: steps.check_typescript_openapi.outputs.files_exists == 'true' + uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3 + id: node_versions + # Continue if no package.json + continue-on-error: true + with: + fallbackNode: '^24' + fallbackNpm: '^11.3' + + - name: Set up node ${{ steps.node_versions.outputs.nodeVersion }} + if: ${{ steps.node_versions.outputs.nodeVersion }} + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + with: + node-version: ${{ steps.node_versions.outputs.nodeVersion }} + + - name: Set up npm ${{ steps.node_versions.outputs.npmVersion }} + if: ${{ steps.node_versions.outputs.nodeVersion }} + run: npm i -g 'npm@${{ steps.node_versions.outputs.npmVersion }}' + + - name: Install dependencies + if: ${{ steps.node_versions.outputs.nodeVersion }} + env: + CYPRESS_INSTALL_BINARY: 0 + PUPPETEER_SKIP_DOWNLOAD: true + run: | + npm ci + + - name: Set up dependencies + run: composer i + + - name: Regenerate OpenAPI + run: composer run openapi + + - name: Check openapi*.json and typescript changes + run: | + bash -c "[[ ! \"`git status --porcelain `\" ]] || (echo 'Please run \"composer run openapi\" and commit the openapi*.json files and (if applicable) src/types/openapi/openapi*.ts, see the section \"Show changes on failure\" for details' && exit 1)" + + - name: Show changes on failure + if: failure() + run: | + git status + git --no-pager diff + exit 1 # make it red to grab attention From d415db610522327ce62d494ce4f260c2ae194973 Mon Sep 17 00:00:00 2001 From: skjnldsv Date: Thu, 2 Jul 2026 11:59:52 +0200 Subject: [PATCH 2/2] ci(actions): keep openapi workflow as openapi-build to escape template sync The org workflow-template updater matches by filename, so an openapi.yml here gets overwritten with the generic app OpenAPI template (composer run openapi) instead of this repo's make openapi-spec build. Revert the templated openapi.yml and restore the previous workflow under the name openapi-build.yml, matching master/stable33/stable34, so it is no longer auto-synced. Assisted-by: ClaudeCode:claude-opus-4-8 Signed-off-by: skjnldsv --- .github/workflows/openapi-build.yml | 34 ++++++++++ .github/workflows/openapi.yml | 96 ----------------------------- 2 files changed, 34 insertions(+), 96 deletions(-) create mode 100644 .github/workflows/openapi-build.yml delete mode 100644 .github/workflows/openapi.yml diff --git a/.github/workflows/openapi-build.yml b/.github/workflows/openapi-build.yml new file mode 100644 index 00000000000..474ac014df6 --- /dev/null +++ b/.github/workflows/openapi-build.yml @@ -0,0 +1,34 @@ +name: OpenAPI + +on: pull_request + +permissions: + contents: read + +concurrency: + group: openapi-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + openapi: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + - name: Set up php + uses: shivammathur/setup-php@20529878ed81ef8e78ddf08b480401e6101a850f # v2 + with: + php-version: '8.1' + # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation + extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib + coverage: none + ini-file: development + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Build using Makefile + run: make openapi-spec diff --git a/.github/workflows/openapi.yml b/.github/workflows/openapi.yml deleted file mode 100644 index f4dba566232..00000000000 --- a/.github/workflows/openapi.yml +++ /dev/null @@ -1,96 +0,0 @@ -# This workflow is provided via the organization template repository -# -# https://github.com/nextcloud/.github -# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization -# -# SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors -# SPDX-FileCopyrightText: 2024 Arthur Schiwon -# SPDX-License-Identifier: MIT - -name: OpenAPI - -on: pull_request - -permissions: - contents: read - -concurrency: - group: openapi-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - openapi: - runs-on: ubuntu-latest - - if: ${{ github.repository_owner != 'nextcloud-gmbh' }} - - steps: - - name: Checkout - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - with: - persist-credentials: false - - - name: Get php version - id: php_versions - uses: icewind1991/nextcloud-version-matrix@8a7bac6300b2f0f3100088b297995a229558ddba # v1.3.2 - - - name: Set up php - uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 - with: - php-version: ${{ steps.php_versions.outputs.php-available }} - extensions: xml - coverage: none - ini-file: development - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Check Typescript OpenApi types - id: check_typescript_openapi - uses: andstor/file-existence-action@558493d6c74bf472d87c84eab196434afc2fa029 # v3.1.0 - with: - files: "src/types/openapi/openapi*.ts" - - - name: Read package.json node and npm engines version - if: steps.check_typescript_openapi.outputs.files_exists == 'true' - uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3 - id: node_versions - # Continue if no package.json - continue-on-error: true - with: - fallbackNode: '^24' - fallbackNpm: '^11.3' - - - name: Set up node ${{ steps.node_versions.outputs.nodeVersion }} - if: ${{ steps.node_versions.outputs.nodeVersion }} - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 - with: - node-version: ${{ steps.node_versions.outputs.nodeVersion }} - - - name: Set up npm ${{ steps.node_versions.outputs.npmVersion }} - if: ${{ steps.node_versions.outputs.nodeVersion }} - run: npm i -g 'npm@${{ steps.node_versions.outputs.npmVersion }}' - - - name: Install dependencies - if: ${{ steps.node_versions.outputs.nodeVersion }} - env: - CYPRESS_INSTALL_BINARY: 0 - PUPPETEER_SKIP_DOWNLOAD: true - run: | - npm ci - - - name: Set up dependencies - run: composer i - - - name: Regenerate OpenAPI - run: composer run openapi - - - name: Check openapi*.json and typescript changes - run: | - bash -c "[[ ! \"`git status --porcelain `\" ]] || (echo 'Please run \"composer run openapi\" and commit the openapi*.json files and (if applicable) src/types/openapi/openapi*.ts, see the section \"Show changes on failure\" for details' && exit 1)" - - - name: Show changes on failure - if: failure() - run: | - git status - git --no-pager diff - exit 1 # make it red to grab attention