Update nextcloud/openapi #67
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors | |
| # SPDX-License-Identifier: MIT | |
| name: Update nextcloud/openapi | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "5 4 * * 0" | |
| permissions: | |
| contents: read | |
| jobs: | |
| update-nextcloud-openapi: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| branches: ['main', 'master', 'stable33', 'stable32'] | |
| name: Update Nextcloud OpenAPI types from core | |
| steps: | |
| - name: Set app env | |
| run: | | |
| # Split and keep last | |
| echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV | |
| - name: Checkout server | |
| if: ${{ matrix.branches != 'main' }} | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| submodules: true | |
| repository: nextcloud/server | |
| ref: ${{ matrix.branches }} | |
| - name: Checkout server (Main) | |
| if: ${{ matrix.branches == 'main' }} | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| submodules: true | |
| repository: nextcloud/server | |
| ref: master | |
| - name: Checkout app | |
| id: checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| path: apps/${{ env.APP_NAME }} | |
| ref: ${{ matrix.branches }} | |
| continue-on-error: true | |
| - name: Read package.json node and npm engines version | |
| if: steps.checkout.outcome == 'success' | |
| uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3 | |
| id: versions | |
| with: | |
| fallbackNode: '^20' | |
| fallbackNpm: '^10' | |
| - name: Set up node ${{ steps.versions.outputs.nodeVersion }} | |
| if: steps.checkout.outcome == 'success' | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: ${{ steps.versions.outputs.nodeVersion }} | |
| - name: Set up npm ${{ steps.versions.outputs.npmVersion }} | |
| if: steps.checkout.outcome == 'success' | |
| run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}' | |
| - name: Install dependencies & generate types | |
| if: steps.checkout.outcome == 'success' | |
| working-directory: apps/${{ env.APP_NAME }} | |
| env: | |
| CYPRESS_INSTALL_BINARY: 0 | |
| PUPPETEER_SKIP_DOWNLOAD: true | |
| run: | | |
| npm ci | |
| npm run ts:generate-core-types --if-present | |
| - name: Create Pull Request | |
| if: steps.checkout.outcome == 'success' | |
| uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 | |
| with: | |
| path: apps/${{ env.APP_NAME }} | |
| token: ${{ secrets.COMMAND_BOT_PAT }} # zizmor: ignore[secrets-outside-env] | |
| commit-message: 'chore(ts): update OpenAPI types from core' | |
| committer: GitHub <noreply@github.com> | |
| author: nextcloud-command <nextcloud-command@users.noreply.github.com> | |
| signoff: true | |
| branch: 'automated/noid/${{ matrix.branches }}-update-nextcloud-openapi' | |
| title: '[${{ matrix.branches }}] Update Nextcloud OpenAPI types' | |
| body: | | |
| Auto-generated update of Nextcloud OpenAPI types | |
| labels: | | |
| dependencies |