diff --git a/.github/workflows/block-merge-freeze.yml b/.github/workflows/block-merge-freeze.yml index 221390bd81..2e4b3e25dc 100644 --- a/.github/workflows/block-merge-freeze.yml +++ b/.github/workflows/block-merge-freeze.yml @@ -22,10 +22,10 @@ jobs: if: github.event.pull_request.draft == false - runs-on: ubuntu-latest + runs-on: ubuntu-latest-low steps: - - name: Register text Git reference + - name: Register server reference to fallback to master branch run: | server_ref="$(if [ "${{ github.base_ref }}" = "main" ]; then echo -n "master"; else echo -n "${{ github.base_ref }}"; fi)" echo "server_ref=$server_ref" >> $GITHUB_ENV diff --git a/.github/workflows/command-compile.yml b/.github/workflows/command-compile.yml index 5f571bed75..282189788a 100644 --- a/.github/workflows/command-compile.yml +++ b/.github/workflows/command-compile.yml @@ -15,15 +15,16 @@ jobs: arg1: ${{ steps.command.outputs.arg1 }} arg2: ${{ steps.command.outputs.arg2 }} head_ref: ${{ steps.comment-branch.outputs.head_ref }} + base_ref: ${{ steps.comment-branch.outputs.base_ref }} steps: - name: Check actor permission - uses: skjnldsv/check-actor-permission@e591dbfe838300c007028e1219ca82cc26e8d7c5 # v2 + uses: skjnldsv/check-actor-permission@69e92a3c4711150929bca9fcf34448c5bf5526e7 # v2 with: require: write - name: Add reaction on start - uses: peter-evans/create-or-update-comment@c6c9a1a66007646a28c153e2a8580a5bad27bcfa # v3.0.2 + uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0 with: token: ${{ secrets.COMMAND_BOT_PAT }} repository: ${{ github.event.repository.full_name }} @@ -31,7 +32,7 @@ jobs: reactions: "+1" - name: Parse command - uses: skjnldsv/parse-command-comment@7cef1df370a99dfd5bf896d50121390c96785db8 # v2 + uses: skjnldsv/parse-command-comment@5c955203c52424151e6d0e58fb9de8a9f6a605a1 # v2 id: command # Init path depending on which command is run @@ -54,13 +55,13 @@ jobs: steps: - name: Restore cached git repository - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 + uses: buildjet/cache@e376f15c6ec6dc595375c78633174c7e5f92dc0e # v3 with: path: .git key: git-repo - name: Checkout ${{ needs.init.outputs.head_ref }} - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: token: ${{ secrets.COMMAND_BOT_PAT }} fetch-depth: 0 @@ -76,45 +77,61 @@ jobs: id: package-engines-versions with: fallbackNode: '^20' - fallbackNpm: '^9' + fallbackNpm: '^10' - name: Set up node ${{ steps.package-engines-versions.outputs.nodeVersion }} - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 + uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3 with: node-version: ${{ steps.package-engines-versions.outputs.nodeVersion }} cache: npm - name: Set up npm ${{ steps.package-engines-versions.outputs.npmVersion }} run: npm i -g npm@"${{ steps.package-engines-versions.outputs.npmVersion }}" + + - name: Rebase to ${{ needs.init.outputs.base_ref }} + if: ${{ contains(needs.init.outputs.arg1, 'rebase') }} + run: | + git fetch origin ${{ needs.init.outputs.base_ref }}:${{ needs.init.outputs.base_ref }} + git rebase origin/${{ needs.init.outputs.base_ref }} - name: Install dependencies & build + env: + CYPRESS_INSTALL_BINARY: 0 + PUPPETEER_SKIP_DOWNLOAD: true run: | npm ci npm run build --if-present - - name: Commit and push default - if: ${{ needs.init.outputs.arg1 != 'fixup' && needs.init.outputs.arg1 != 'amend' }} + - name: Commit default + if: ${{ !contains(needs.init.outputs.arg1, 'fixup') && !contains(needs.init.outputs.arg1, 'amend') }} run: | git add ${{ github.workspace }}${{ needs.init.outputs.git_path }} git commit --signoff -m 'chore(assets): Recompile assets' - git push origin ${{ needs.init.outputs.head_ref }} - - - name: Commit and push fixup - if: ${{ needs.init.outputs.arg1 == 'fixup' }} + + - name: Commit fixup + if: ${{ contains(needs.init.outputs.arg1, 'fixup') }} run: | - git add ${{ needs.init.outputs.git_path }} + git add ${{ github.workspace }}${{ needs.init.outputs.git_path }} git commit --fixup=HEAD --signoff - git push origin ${{ needs.init.outputs.head_ref }} - - name: Commit and push amend - if: ${{ needs.init.outputs.arg1 == 'amend' }} + - name: Commit amend + if: ${{ contains(needs.init.outputs.arg1, 'amend') }} run: | - git add ${{ needs.init.outputs.git_path }} + git add ${{ github.workspace }}${{ needs.init.outputs.git_path }} git commit --amend --no-edit --signoff - git push --force origin ${{ needs.init.outputs.head_ref }} + # Remove any [skip ci] from the amended commit + git commit --amend -m "$(git log -1 --format='%B' | sed '/\[skip ci\]/d')" + + - name: Push normally + if: ${{ !contains(needs.init.outputs.arg1, 'rebase') && !contains(needs.init.outputs.arg1, 'amend') }} + run: git push origin ${{ needs.init.outputs.head_ref }} + + - name: Force push + if: ${{ contains(needs.init.outputs.arg1, 'rebase') || contains(needs.init.outputs.arg1, 'amend') }} + run: git push --force origin ${{ needs.init.outputs.head_ref }} - name: Add reaction on failure - uses: peter-evans/create-or-update-comment@c6c9a1a66007646a28c153e2a8580a5bad27bcfa # v3.0.2 + uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0 if: failure() with: token: ${{ secrets.COMMAND_BOT_PAT }} diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 3be3bd6be9..189449d965 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -41,6 +41,13 @@ jobs: ref: ${{ matrix.server-versions }} path: apps/viewer + - name: Checkout assistant + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + with: + repository: nextcloud/assistant + ref: 'main' + path: apps/assistant + - name: Checkout app uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 with: @@ -69,6 +76,13 @@ jobs: npm ci TESTING=true npm run build --if-present + - name: Install dependencies & build assistant + working-directory: apps/assistant + run: | + composer install --no-dev + npm ci + npm run build + - name: Save context uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 with: @@ -85,7 +99,6 @@ jobs: node-version: [16] containers: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] php-versions: [ '8.1' ] - server-versions: [ 'stable28' ] run-in-parallel: - false # only for PRs: ${{ !!github.head_ref }} @@ -143,6 +156,8 @@ jobs: php occ user:add --password-from-env user2 php occ app:enable viewer php occ app:enable text + php occ app:enable assistant + php occ app:enable testing php occ app:list php occ background:cron php occ config:system:set session_keepalive --value=false --type=boolean diff --git a/.github/workflows/dependabot-approve-merge.yml b/.github/workflows/dependabot-approve-merge.yml index e81d209bf7..6ea67d6d4d 100644 --- a/.github/workflows/dependabot-approve-merge.yml +++ b/.github/workflows/dependabot-approve-merge.yml @@ -22,7 +22,7 @@ concurrency: jobs: auto-approve-merge: if: github.actor == 'dependabot[bot]' || github.actor == 'renovate[bot]' - runs-on: ubuntu-latest + runs-on: ubuntu-latest-low permissions: # for hmarr/auto-approve-action to approve PRs pull-requests: write diff --git a/.github/workflows/fixup.yml b/.github/workflows/fixup.yml index 9548d19f2d..98d49927ab 100644 --- a/.github/workflows/fixup.yml +++ b/.github/workflows/fixup.yml @@ -24,7 +24,7 @@ jobs: pull-requests: write name: Block fixup and squash commits - runs-on: ubuntu-latest + runs-on: ubuntu-latest-low steps: - name: Run check diff --git a/.github/workflows/lint-eslint.yml b/.github/workflows/lint-eslint.yml index 99b624d1a6..5344620b02 100644 --- a/.github/workflows/lint-eslint.yml +++ b/.github/workflows/lint-eslint.yml @@ -19,13 +19,13 @@ concurrency: jobs: changes: - runs-on: ubuntu-latest + runs-on: ubuntu-latest-low outputs: src: ${{ steps.changes.outputs.src}} steps: - - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 + - uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0.0 id: changes continue-on-error: true with: @@ -60,10 +60,10 @@ jobs: id: versions with: fallbackNode: '^20' - fallbackNpm: '^9' + fallbackNpm: '^10' - name: Set up node ${{ steps.versions.outputs.nodeVersion }} - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v3 + uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v3 with: node-version: ${{ steps.versions.outputs.nodeVersion }} @@ -82,7 +82,7 @@ jobs: summary: permissions: contents: none - runs-on: ubuntu-latest + runs-on: ubuntu-latest-low needs: [changes, lint] if: always() diff --git a/.github/workflows/lint-php-cs.yml b/.github/workflows/lint-php-cs.yml index 0fdb3ebf5e..bfdcb1460b 100644 --- a/.github/workflows/lint-php-cs.yml +++ b/.github/workflows/lint-php-cs.yml @@ -22,12 +22,13 @@ jobs: steps: - name: Checkout - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Set up php - uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2 + - name: Set up php8.2 + uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d # v2 with: - php-version: 8.1 + php-version: 8.2 + 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: diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml index aede1fe09e..ace42769cc 100644 --- a/.github/workflows/lint-php.yml +++ b/.github/workflows/lint-php.yml @@ -5,13 +5,7 @@ name: Lint php -on: - pull_request: - push: - branches: - - main - - master - - stable* +on: pull_request permissions: contents: read @@ -25,18 +19,19 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-versions: [ "8.0", "8.1", "8.2", "8.3" ] + php-versions: [ '8.0', '8.1', '8.2', '8.3' ] name: php-lint steps: - name: Checkout - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2 + uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d # v2 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: @@ -48,7 +43,7 @@ jobs: summary: permissions: contents: none - runs-on: ubuntu-latest + runs-on: ubuntu-latest-low needs: php-lint if: always() diff --git a/.github/workflows/lint-stylelint.yml b/.github/workflows/lint-stylelint.yml index 1062b1c8f3..a736046da1 100644 --- a/.github/workflows/lint-stylelint.yml +++ b/.github/workflows/lint-stylelint.yml @@ -22,17 +22,17 @@ jobs: steps: - name: Checkout - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Read package.json node and npm engines version uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2 id: versions with: fallbackNode: '^20' - fallbackNpm: '^9' + fallbackNpm: '^10' - name: Set up node ${{ steps.versions.outputs.nodeVersion }} - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 + uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v3 with: node-version: ${{ steps.versions.outputs.nodeVersion }} @@ -40,6 +40,8 @@ jobs: run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" - name: Install dependencies + env: + CYPRESS_INSTALL_BINARY: 0 run: npm ci - name: Lint diff --git a/.github/workflows/npm-audit-fix.yml b/.github/workflows/npm-audit-fix.yml index 7a9f1526b4..cd842fdd2c 100644 --- a/.github/workflows/npm-audit-fix.yml +++ b/.github/workflows/npm-audit-fix.yml @@ -18,13 +18,13 @@ jobs: strategy: fail-fast: false matrix: - branches: ["main", "stable27", "stable26", "stable25", "stable24"] + branches: ['main', 'master', 'stable28', 'stable27', 'stable26'] name: npm-audit-fix-${{ matrix.branches }} steps: - name: Checkout - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: ref: ${{ matrix.branches }} @@ -33,10 +33,10 @@ jobs: id: versions with: fallbackNode: '^20' - fallbackNpm: '^9' + fallbackNpm: '^10' - name: Set up node ${{ steps.versions.outputs.nodeVersion }} - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 + uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v3 with: node-version: ${{ steps.versions.outputs.nodeVersion }} @@ -48,12 +48,17 @@ jobs: npm audit fix - name: Run npm ci and npm run build + if: always() + env: + CYPRESS_INSTALL_BINARY: 0 run: | npm ci npm run build --if-present + git checkout -- js/ - name: Create Pull Request - uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5 + if: always() + uses: peter-evans/create-pull-request@b1ddad2c994a25fbc81a28b3ec0e368bb2021c50 # v5 with: token: ${{ secrets.COMMAND_BOT_PAT }} commit-message: "chore(deps): fix npm audit" diff --git a/.github/workflows/phpunit-mariadb.yml b/.github/workflows/phpunit-mariadb.yml index d52ea44211..1c562c0fa6 100644 --- a/.github/workflows/phpunit-mariadb.yml +++ b/.github/workflows/phpunit-mariadb.yml @@ -15,14 +15,27 @@ concurrency: cancel-in-progress: true jobs: + matrix: + runs-on: ubuntu-latest-low + outputs: + php-max: ${{ steps.versions.outputs.php-max-list }} + server-max: ${{ steps.versions.outputs.branches-max-list }} + steps: + - name: Checkout app + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Get version matrix + id: versions + uses: icewind1991/nextcloud-version-matrix@d594a6929da316b732c53355e52a1ead77ba36c7 # v1.2.0 + changes: - runs-on: ubuntu-latest + runs-on: ubuntu-latest-low outputs: src: ${{ steps.changes.outputs.src}} steps: - - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 + - uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0.0 id: changes continue-on-error: true with: @@ -42,14 +55,14 @@ jobs: phpunit-mariadb: runs-on: ubuntu-latest - needs: changes + needs: [changes, matrix] if: needs.changes.outputs.src != 'false' strategy: matrix: - php-versions: ['8.2'] + php-versions: ${{ fromJson(needs.matrix.outputs.php-max) }} + server-versions: ${{ fromJson(needs.matrix.outputs.server-max) }} mariadb-versions: ['10.6', '10.11'] - server-versions: ['stable28'] name: MariaDB ${{ matrix.mariadb-versions }} PHP ${{ matrix.php-versions }} Nextcloud ${{ matrix.server-versions }} @@ -81,7 +94,7 @@ jobs: path: apps/${{ env.APP_NAME }} - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2 + uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d # v2 with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation @@ -98,7 +111,7 @@ jobs: - name: Check composer file existence id: check_composer - uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2 + uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v2 with: files: apps/${{ env.APP_NAME }}/composer.json @@ -162,7 +175,7 @@ jobs: summary: permissions: contents: none - runs-on: ubuntu-latest + runs-on: ubuntu-latest-low needs: [changes, phpunit-mariadb] if: always() diff --git a/.github/workflows/phpunit-mysql.yml b/.github/workflows/phpunit-mysql.yml index cd1188ce47..4e3bd5eec1 100644 --- a/.github/workflows/phpunit-mysql.yml +++ b/.github/workflows/phpunit-mysql.yml @@ -15,14 +15,28 @@ concurrency: cancel-in-progress: true jobs: + matrix: + runs-on: ubuntu-latest-low + outputs: + matrix: ${{ steps.versions.outputs.sparse-matrix }} + steps: + - name: Checkout app + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Get version matrix + id: versions + uses: icewind1991/nextcloud-version-matrix@d594a6929da316b732c53355e52a1ead77ba36c7 # v1.2.0 + with: + matrix: '{"mysql-versions": ["8.1"]}' + changes: - runs-on: ubuntu-latest + runs-on: ubuntu-latest-low outputs: src: ${{ steps.changes.outputs.src}} steps: - - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 + - uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0.0 id: changes continue-on-error: true with: @@ -42,14 +56,11 @@ jobs: phpunit-mysql: runs-on: ubuntu-latest - needs: changes + needs: [changes, matrix] if: needs.changes.outputs.src != 'false' strategy: - matrix: - php-versions: ['8.0', '8.1', '8.2', '8.3'] - server-versions: ['stable28'] - mysql-versions: ['8.1'] + matrix: ${{ fromJson(needs.matrix.outputs.matrix) }} name: MySQL ${{ matrix.mysql-versions }} PHP ${{ matrix.php-versions }} Nextcloud ${{ matrix.server-versions }} @@ -81,7 +92,7 @@ jobs: path: apps/${{ env.APP_NAME }} - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2 + uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d # v2 with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation @@ -98,7 +109,7 @@ jobs: - name: Check composer file existence id: check_composer - uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2 + uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v2 with: files: apps/${{ env.APP_NAME }}/composer.json @@ -162,7 +173,7 @@ jobs: summary: permissions: contents: none - runs-on: ubuntu-latest + runs-on: ubuntu-latest-low needs: [changes, phpunit-mysql] if: always() diff --git a/.github/workflows/phpunit-oci.yml b/.github/workflows/phpunit-oci.yml index 3e4827e5b4..d18ef028e9 100644 --- a/.github/workflows/phpunit-oci.yml +++ b/.github/workflows/phpunit-oci.yml @@ -15,14 +15,27 @@ concurrency: cancel-in-progress: true jobs: + matrix: + runs-on: ubuntu-latest-low + outputs: + php-max: ${{ steps.versions.outputs.php-max-list }} + server-max: ${{ steps.versions.outputs.branches-max-list }} + steps: + - name: Checkout app + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Get version matrix + id: versions + uses: icewind1991/nextcloud-version-matrix@d594a6929da316b732c53355e52a1ead77ba36c7 # v1.2.0 + changes: - runs-on: ubuntu-latest + runs-on: ubuntu-latest-low outputs: src: ${{ steps.changes.outputs.src}} steps: - - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 + - uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0.0 id: changes continue-on-error: true with: @@ -42,13 +55,13 @@ jobs: phpunit-oci: runs-on: ubuntu-22.04 - needs: changes + needs: [changes, matrix] if: needs.changes.outputs.src != 'false' strategy: matrix: - php-versions: ['8.2'] - server-versions: ['stable28'] + php-versions: ${{ fromJson(needs.matrix.outputs.php-max) }} + server-versions: ${{ fromJson(needs.matrix.outputs.server-max) }} services: oracle: @@ -90,7 +103,7 @@ jobs: path: apps/${{ env.APP_NAME }} - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2 + uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d # v2 with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation @@ -102,7 +115,7 @@ jobs: - name: Check composer file existence id: check_composer - uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2 + uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v2 with: files: apps/${{ env.APP_NAME }}/composer.json @@ -166,7 +179,7 @@ jobs: summary: permissions: contents: none - runs-on: ubuntu-latest + runs-on: ubuntu-latest-low needs: [changes, phpunit-oci] if: always() diff --git a/.github/workflows/phpunit-pgsql.yml b/.github/workflows/phpunit-pgsql.yml index 0b0f6c116f..7111f3017f 100644 --- a/.github/workflows/phpunit-pgsql.yml +++ b/.github/workflows/phpunit-pgsql.yml @@ -15,14 +15,27 @@ concurrency: cancel-in-progress: true jobs: + matrix: + runs-on: ubuntu-latest-low + outputs: + php-max: ${{ steps.versions.outputs.php-max-list }} + server-max: ${{ steps.versions.outputs.branches-max-list }} + steps: + - name: Checkout app + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Get version matrix + id: versions + uses: icewind1991/nextcloud-version-matrix@d594a6929da316b732c53355e52a1ead77ba36c7 # v1.2.0 + changes: - runs-on: ubuntu-latest + runs-on: ubuntu-latest-low outputs: src: ${{ steps.changes.outputs.src}} steps: - - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 + - uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0.0 id: changes continue-on-error: true with: @@ -42,13 +55,13 @@ jobs: phpunit-pgsql: runs-on: ubuntu-latest - needs: changes + needs: [changes, matrix] if: needs.changes.outputs.src != 'false' strategy: matrix: - php-versions: ['8.2'] - server-versions: ['stable28'] + php-versions: ${{ fromJson(needs.matrix.outputs.php-max) }} + server-versions: ${{ fromJson(needs.matrix.outputs.server-max) }} services: postgres: @@ -80,7 +93,7 @@ jobs: path: apps/${{ env.APP_NAME }} - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2 + uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d # v2 with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation @@ -92,7 +105,7 @@ jobs: - name: Check composer file existence id: check_composer - uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2 + uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v2 with: files: apps/${{ env.APP_NAME }}/composer.json @@ -156,7 +169,7 @@ jobs: summary: permissions: contents: none - runs-on: ubuntu-latest + runs-on: ubuntu-latest-low needs: [changes, phpunit-pgsql] if: always() diff --git a/.github/workflows/phpunit-sqlite.yml b/.github/workflows/phpunit-sqlite.yml index 4600aa000e..1deb1bdd56 100644 --- a/.github/workflows/phpunit-sqlite.yml +++ b/.github/workflows/phpunit-sqlite.yml @@ -15,14 +15,27 @@ concurrency: cancel-in-progress: true jobs: + matrix: + runs-on: ubuntu-latest-low + outputs: + php-max: ${{ steps.versions.outputs.php-max-list }} + server-max: ${{ steps.versions.outputs.branches-max-list }} + steps: + - name: Checkout app + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Get version matrix + id: versions + uses: icewind1991/nextcloud-version-matrix@d594a6929da316b732c53355e52a1ead77ba36c7 # v1.2.0 + changes: - runs-on: ubuntu-latest + runs-on: ubuntu-latest-low outputs: src: ${{ steps.changes.outputs.src}} steps: - - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 + - uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0.0 id: changes continue-on-error: true with: @@ -42,13 +55,13 @@ jobs: phpunit-sqlite: runs-on: ubuntu-latest - needs: changes + needs: [changes, matrix] if: needs.changes.outputs.src != 'false' strategy: matrix: - php-versions: ['8.2'] - server-versions: ['stable28'] + php-versions: ${{ fromJson(needs.matrix.outputs.php-max) }} + server-versions: ${{ fromJson(needs.matrix.outputs.server-max) }} steps: - name: Set app env @@ -69,7 +82,7 @@ jobs: path: apps/${{ env.APP_NAME }} - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2 + uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d # v2 with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation @@ -81,7 +94,7 @@ jobs: - name: Check composer file existence id: check_composer - uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2 + uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v2 with: files: apps/${{ env.APP_NAME }}/composer.json @@ -145,7 +158,7 @@ jobs: summary: permissions: contents: none - runs-on: ubuntu-latest + runs-on: ubuntu-latest-low needs: [changes, phpunit-sqlite] if: always() diff --git a/.github/workflows/pr-feedback.yml b/.github/workflows/pr-feedback.yml index ea40f79433..0e7359decd 100644 --- a/.github/workflows/pr-feedback.yml +++ b/.github/workflows/pr-feedback.yml @@ -1,3 +1,8 @@ +# 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 + name: 'Ask for feedback on PRs' on: schedule: @@ -5,7 +10,7 @@ on: jobs: pr-feedback: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - name: The get-github-handles-from-website action uses: marcelklehr/get-github-handles-from-website-action@a739600f6b91da4957f51db0792697afbb2f143c # v1.0.0 @@ -18,12 +23,12 @@ jobs: Hello there, Thank you so much for taking the time and effort to create a pull request to our Nextcloud project. - We hope that the reviewing process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR reviewing process. + We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! days-before-feedback: 14 start-date: "2023-07-10" - exempt-authors: "${{ steps.scrape.outputs.users }}" + exempt-authors: "${{ steps.scrape.outputs.users }},nextcloud-command,nextcloud-android-bot,skjnldsv,datenangebot" exempt-bots: true diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml index bc5430b2b6..ff526a2a06 100644 --- a/.github/workflows/psalm.yml +++ b/.github/workflows/psalm.yml @@ -5,13 +5,7 @@ name: Static analysis -on: - pull_request: - push: - branches: - - master - - main - - stable* +on: pull_request concurrency: group: psalm-${{ github.head_ref || github.run_id }} @@ -21,15 +15,16 @@ jobs: static-analysis: runs-on: ubuntu-latest - name: Nextcloud + name: static-psalm-analysis steps: - name: Checkout - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Set up php - uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2 + - name: Set up php8.2 + uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d # v2 with: - php-version: 8.1 + php-version: 8.2 + 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: diff --git a/.github/workflows/update-nextcloud-ocp.yml b/.github/workflows/update-nextcloud-ocp.yml index 0cf31409c2..1095685f5f 100644 --- a/.github/workflows/update-nextcloud-ocp.yml +++ b/.github/workflows/update-nextcloud-ocp.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - branches: ["main", "master", "stable27", "stable26", "stable25"] + branches: ["main", "master", "stable28", "stable27", "stable26"] name: update-nextcloud-ocp-${{ matrix.branches }} diff --git a/.github/workflows/update-node-dist.yml b/.github/workflows/update-node-dist.yml index 184326cdf0..008398eec0 100644 --- a/.github/workflows/update-node-dist.yml +++ b/.github/workflows/update-node-dist.yml @@ -4,6 +4,7 @@ on: workflow_dispatch: push: branches: + # implemented since 28, once branched off, add your stable branch here - main - stable28 @@ -52,10 +53,14 @@ jobs: id: changes continue-on-error: true run: | - bash -c "[[ ! \"`git status --porcelain `\" ]] || (echo 'Please recompile and commit the assets, see the section \"Show changes on failure\" for details' && exit 1)" + { + echo 'CHANGED<> "$GITHUB_OUTPUT" - name: Add and commit - if: steps.changes.outcome == 'failure' + if: steps.changes.outputs.CHANGED != '' run: | git add --force js/ git commit --signoff -m 'chore(assets): recompile assets'