diff --git a/.github/workflows/block-merge-freeze.yml b/.github/workflows/block-merge-freeze.yml
index f2d029c99..2e4b3e25d 100644
--- a/.github/workflows/block-merge-freeze.yml
+++ b/.github/workflows/block-merge-freeze.yml
@@ -22,11 +22,15 @@ jobs:
if: github.event.pull_request.draft == false
- runs-on: ubuntu-latest
+ runs-on: ubuntu-latest-low
steps:
- - name: Download version.php from ${{ github.base_ref }}
- run: curl https://raw.githubusercontent.com/nextcloud/server/${{ github.base_ref }}/version.php --output version.php
+ - 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
+ - name: Download version.php from ${{ env.server_ref }}
+ run: curl https://raw.githubusercontent.com/nextcloud/server/${{ env.server_ref }}/version.php --output version.php
- name: Run check
run: cat version.php | grep 'OC_VersionString' | grep -i -v 'RC'
diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml
index cdb8d90fb..82f844cf0 100644
--- a/.github/workflows/cypress.yml
+++ b/.github/workflows/cypress.yml
@@ -1,12 +1,10 @@
name: Cypress
-on:
- pull_request:
- push:
- branches:
- - main
- - master
- - stable*
+on: pull_request
+
+concurrency:
+ group: cypress-${{ github.head_ref || github.run_id }}
+ cancel-in-progress: true
env:
# Adjust APP_NAME if your repository name is different
@@ -25,13 +23,16 @@ jobs:
nodeVersion: ${{ steps.versions.outputs.nodeVersion }}
npmVersion: ${{ steps.versions.outputs.npmVersion }}
+ env:
+ PUPPETEER_SKIP_DOWNLOAD: true
+
steps:
- name: Checkout app
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
+ uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Check composer.json
id: check_composer
- uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2
+ uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v2
with:
files: "composer.json"
@@ -40,14 +41,14 @@ jobs:
run: composer install --no-dev
- name: Read package.json node and npm engines version
- uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1
+ 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.6.0
+ uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}
@@ -74,7 +75,7 @@ jobs:
matrix:
# Run multiple copies of the current job in parallel
# Please increase the number or runners as your tests suite grows
- containers: [1, 2, 3]
+ containers: ["component", 1, 2, 3]
name: runner ${{ matrix.containers }}
@@ -87,7 +88,7 @@ jobs:
path: ./
- name: Set up node ${{ needs.init.outputs.nodeVersion }}
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
+ uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version: ${{ needs.init.outputs.nodeVersion }}
@@ -95,7 +96,7 @@ jobs:
run: npm i -g npm@"${{ needs.init.outputs.npmVersion }}"
- name: Run ${{ matrix.containers == 'component' && 'component' || 'E2E' }} cypress tests
- uses: cypress-io/github-action@db1693016f23ccf9043f4b2428f9b04e5d502a73 # v5.8.1
+ uses: cypress-io/github-action@1b70233146622b69e789ccdd4f9452adc638d25a # v6.6.1
with:
record: true
parallel: true
@@ -116,7 +117,7 @@ jobs:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
- name: Upload snapshots
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
+ uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
if: always()
with:
name: snapshots_${{ matrix.containers }}
@@ -127,7 +128,7 @@ jobs:
run: docker logs nextcloud-cypress-tests-${{ env.APP_NAME }} > nextcloud.log
- name: Upload NC logs
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
+ uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
if: failure() && matrix.containers != 'component'
with:
name: nc_logs_${{ matrix.containers }}
diff --git a/.github/workflows/dependabot-approve-merge.yml b/.github/workflows/dependabot-approve-merge.yml
index 9951547f7..00b019613 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]'
- 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 9548d19f2..98d49927a 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 508d71395..5344620b0 100644
--- a/.github/workflows/lint-eslint.yml
+++ b/.github/workflows/lint-eslint.yml
@@ -8,20 +8,7 @@
name: Lint eslint
-on:
- pull_request:
- paths:
- - '.github/workflows/**'
- - 'src/**'
- - 'appinfo/info.xml'
- - 'package.json'
- - 'package-lock.json'
- - 'tsconfig.json'
- - '.eslintrc.*'
- - '.eslintignore'
- - '**.js'
- - '**.ts'
- - '**.vue'
+on: pull_request
permissions:
contents: read
@@ -31,24 +18,52 @@ concurrency:
cancel-in-progress: true
jobs:
+ changes:
+ runs-on: ubuntu-latest-low
+
+ outputs:
+ src: ${{ steps.changes.outputs.src}}
+
+ steps:
+ - uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0.0
+ id: changes
+ continue-on-error: true
+ with:
+ filters: |
+ src:
+ - '.github/workflows/**'
+ - 'src/**'
+ - 'appinfo/info.xml'
+ - 'package.json'
+ - 'package-lock.json'
+ - 'tsconfig.json'
+ - '.eslintrc.*'
+ - '.eslintignore'
+ - '**.js'
+ - '**.ts'
+ - '**.vue'
+
lint:
runs-on: ubuntu-latest
- name: eslint
+ needs: changes
+ if: needs.changes.outputs.src != 'false'
+
+ name: NPM lint
steps:
- name: Checkout
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
+ uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Read package.json node and npm engines version
- uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1
+ uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
id: versions
with:
- fallbackNode: '^16'
- fallbackNpm: '^7'
+ fallbackNode: '^20'
+ 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 }}
@@ -56,7 +71,25 @@ jobs:
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
- name: Install dependencies
+ env:
+ CYPRESS_INSTALL_BINARY: 0
+ PUPPETEER_SKIP_DOWNLOAD: true
run: npm ci
- name: Lint
run: npm run lint
+
+ summary:
+ permissions:
+ contents: none
+ runs-on: ubuntu-latest-low
+ needs: [changes, lint]
+
+ if: always()
+
+ # This is the summary, we just avoid to rename it so that branch protection rules still match
+ name: eslint
+
+ steps:
+ - name: Summary status
+ run: if ${{ needs.changes.outputs.src != 'false' && needs.lint.result != 'success' }}; then exit 1; fi
diff --git a/.github/workflows/lint-php-cs.yml b/.github/workflows/lint-php-cs.yml
index f8d337511..bfdcb1460 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@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
+ uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- - name: Set up php
- uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # 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 8d7f63f84..ace42769c 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" ]
+ php-versions: [ '8.0', '8.1', '8.2', '8.3' ]
name: php-lint
steps:
- name: Checkout
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
+ uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up php ${{ matrix.php-versions }}
- uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # 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 60cb63a56..a736046da 100644
--- a/.github/workflows/lint-stylelint.yml
+++ b/.github/workflows/lint-stylelint.yml
@@ -22,17 +22,17 @@ jobs:
steps:
- name: Checkout
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
+ uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Read package.json node and npm engines version
- uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1
+ uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
id: versions
with:
- fallbackNode: '^16'
- fallbackNpm: '^7'
+ fallbackNode: '^20'
+ 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/node.yml b/.github/workflows/node.yml
index 1774e0b27..b11e9ceff 100644
--- a/.github/workflows/node.yml
+++ b/.github/workflows/node.yml
@@ -5,23 +5,7 @@
name: Node
-on:
- pull_request:
- paths:
- - '.github/workflows/**'
- - 'src/**'
- - 'appinfo/info.xml'
- - 'package.json'
- - 'package-lock.json'
- - 'tsconfig.json'
- - '**.js'
- - '**.ts'
- - '**.vue'
- push:
- branches:
- - main
- - master
- - stable*
+on: pull_request
permissions:
contents: read
@@ -31,23 +15,49 @@ concurrency:
cancel-in-progress: true
jobs:
+ changes:
+ runs-on: ubuntu-latest-low
+
+ outputs:
+ src: ${{ steps.changes.outputs.src}}
+
+ steps:
+ - uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0.0
+ id: changes
+ continue-on-error: true
+ with:
+ filters: |
+ src:
+ - '.github/workflows/**'
+ - 'src/**'
+ - 'appinfo/info.xml'
+ - 'package.json'
+ - 'package-lock.json'
+ - 'tsconfig.json'
+ - '**.js'
+ - '**.ts'
+ - '**.vue'
+
build:
runs-on: ubuntu-latest
- name: node
+ needs: changes
+ if: needs.changes.outputs.src != 'false'
+
+ name: NPM build
steps:
- name: Checkout
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
+ uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Read package.json node and npm engines version
- uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1
+ uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
id: versions
with:
- fallbackNode: '^16'
- fallbackNpm: '^7'
+ fallbackNode: '^20'
+ 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 }}
@@ -55,6 +65,9 @@ jobs:
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
- name: Install dependencies & build
+ env:
+ CYPRESS_INSTALL_BINARY: 0
+ PUPPETEER_SKIP_DOWNLOAD: true
run: |
npm ci
npm run build --if-present
@@ -69,3 +82,18 @@ jobs:
git status
git --no-pager diff
exit 1 # make it red to grab attention
+
+ summary:
+ permissions:
+ contents: none
+ runs-on: ubuntu-latest-low
+ needs: [changes, build]
+
+ if: always()
+
+ # This is the summary, we just avoid to rename it so that branch protection rules still match
+ name: node
+
+ steps:
+ - name: Summary status
+ run: if ${{ needs.changes.outputs.src != 'false' && needs.build.result != 'success' }}; then exit 1; fi
diff --git a/.github/workflows/npm-audit-fix.yml b/.github/workflows/npm-audit-fix.yml
index b4f1a0e84..33ea8029b 100644
--- a/.github/workflows/npm-audit-fix.yml
+++ b/.github/workflows/npm-audit-fix.yml
@@ -18,25 +18,25 @@ jobs:
strategy:
fail-fast: false
matrix:
- branches: ["main", "master", "stable28", "stable27", "stable26", "stable25", "stable24"]
-
+ branches: ['main', 'master', 'stable28', 'stable27', 'stable26']
+
name: npm-audit-fix-${{ matrix.branches }}
steps:
- name: Checkout
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
+ uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ matrix.branches }}
- name: Read package.json node and npm engines version
- uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1
+ uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
id: versions
with:
- fallbackNode: '^16'
- fallbackNpm: '^7'
+ fallbackNode: '^20'
+ 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 }}
@@ -49,13 +49,15 @@ jobs:
- name: Run npm ci and npm run build
if: always()
+ env:
+ CYPRESS_INSTALL_BINARY: 0
run: |
npm ci
npm run build --if-present
- name: Create Pull Request
if: always()
- uses: peter-evans/create-pull-request@284f54f989303d2699d373481a0cfa13ad5a6666 # v5
+ 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-mysql.yml b/.github/workflows/phpunit-mysql.yml
index ebfe5f457..4e3bd5eec 100644
--- a/.github/workflows/phpunit-mysql.yml
+++ b/.github/workflows/phpunit-mysql.yml
@@ -3,27 +3,9 @@
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
-name: PHPUnit mysql
-
-on:
- pull_request:
- paths:
- - '.github/workflows/**'
- - 'appinfo/**'
- - 'lib/**'
- - 'templates/**'
- - 'tests/**'
- - 'vendor/**'
- - 'vendor-bin/**'
- - '.php-cs-fixer.dist.php'
- - 'composer.json'
- - 'composer.lock'
-
- push:
- branches:
- - main
- - master
- - stable*
+name: PHPUnit MySQL
+
+on: pull_request
permissions:
contents: read
@@ -33,17 +15,58 @@ 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-low
+
+ outputs:
+ src: ${{ steps.changes.outputs.src}}
+
+ steps:
+ - uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0.0
+ id: changes
+ continue-on-error: true
+ with:
+ filters: |
+ src:
+ - '.github/workflows/**'
+ - 'appinfo/**'
+ - 'lib/**'
+ - 'templates/**'
+ - 'tests/**'
+ - 'vendor/**'
+ - 'vendor-bin/**'
+ - '.php-cs-fixer.dist.php'
+ - 'composer.json'
+ - 'composer.lock'
+
phpunit-mysql:
runs-on: ubuntu-latest
+ needs: [changes, matrix]
+ if: needs.changes.outputs.src != 'false'
+
strategy:
- matrix:
- php-versions: ['8.0', '8.1', '8.2', '8.3']
- server-versions: ['master']
+ matrix: ${{ fromJson(needs.matrix.outputs.matrix) }}
+
+ name: MySQL ${{ matrix.mysql-versions }} PHP ${{ matrix.php-versions }} Nextcloud ${{ matrix.server-versions }}
services:
mysql:
- image: ghcr.io/nextcloud/continuous-integration-mariadb-10.6:latest
+ image: ghcr.io/nextcloud/continuous-integration-mysql-${{ matrix.mysql-versions }}:latest
ports:
- 4444:3306/tcp
env:
@@ -57,19 +80,19 @@ jobs:
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
- name: Checkout server
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
+ uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: true
repository: nextcloud/server
ref: ${{ matrix.server-versions }}
- name: Checkout app
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
+ uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
path: apps/${{ env.APP_NAME }}
- 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 }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -86,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
@@ -150,8 +173,8 @@ jobs:
summary:
permissions:
contents: none
- runs-on: ubuntu-latest
- needs: phpunit-mysql
+ runs-on: ubuntu-latest-low
+ needs: [changes, phpunit-mysql]
if: always()
@@ -159,4 +182,4 @@ jobs:
steps:
- name: Summary status
- run: if ${{ needs.phpunit-mysql.result != 'success' }}; then exit 1; fi
+ run: if ${{ needs.changes.outputs.src != 'false' && needs.phpunit-mysql.result != 'success' }}; then exit 1; fi
diff --git a/.github/workflows/phpunit-oci.yml b/.github/workflows/phpunit-oci.yml
index 4f48c528a..d18ef028e 100644
--- a/.github/workflows/phpunit-oci.yml
+++ b/.github/workflows/phpunit-oci.yml
@@ -5,25 +5,7 @@
name: PHPUnit OCI
-on:
- pull_request:
- paths:
- - '.github/workflows/**'
- - 'appinfo/**'
- - 'lib/**'
- - 'templates/**'
- - 'tests/**'
- - 'vendor/**'
- - 'vendor-bin/**'
- - '.php-cs-fixer.dist.php'
- - 'composer.json'
- - 'composer.lock'
-
- push:
- branches:
- - main
- - master
- - stable*
+on: pull_request
permissions:
contents: read
@@ -33,13 +15,53 @@ 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-low
+
+ outputs:
+ src: ${{ steps.changes.outputs.src}}
+
+ steps:
+ - uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0.0
+ id: changes
+ continue-on-error: true
+ with:
+ filters: |
+ src:
+ - '.github/workflows/**'
+ - 'appinfo/**'
+ - 'lib/**'
+ - 'templates/**'
+ - 'tests/**'
+ - 'vendor/**'
+ - 'vendor-bin/**'
+ - '.php-cs-fixer.dist.php'
+ - 'composer.json'
+ - 'composer.lock'
+
phpunit-oci:
- runs-on: ubuntu-latest
+ runs-on: ubuntu-22.04
+
+ needs: [changes, matrix]
+ if: needs.changes.outputs.src != 'false'
strategy:
matrix:
- php-versions: ['8.0']
- server-versions: ['master']
+ php-versions: ${{ fromJson(needs.matrix.outputs.php-max) }}
+ server-versions: ${{ fromJson(needs.matrix.outputs.server-max) }}
services:
oracle:
@@ -69,19 +91,19 @@ jobs:
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
- name: Checkout server
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
+ uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: true
repository: nextcloud/server
ref: ${{ matrix.server-versions }}
- name: Checkout app
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
+ uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
path: apps/${{ env.APP_NAME }}
- 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 }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -93,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
@@ -157,8 +179,8 @@ jobs:
summary:
permissions:
contents: none
- runs-on: ubuntu-latest
- needs: phpunit-oci
+ runs-on: ubuntu-latest-low
+ needs: [changes, phpunit-oci]
if: always()
@@ -166,4 +188,4 @@ jobs:
steps:
- name: Summary status
- run: if ${{ needs.phpunit-oci.result != 'success' }}; then exit 1; fi
\ No newline at end of file
+ run: if ${{ needs.changes.outputs.src != 'false' && needs.phpunit-oci.result != 'success' }}; then exit 1; fi
diff --git a/.github/workflows/phpunit-pgsql.yml b/.github/workflows/phpunit-pgsql.yml
index 854c8288c..7111f3017 100644
--- a/.github/workflows/phpunit-pgsql.yml
+++ b/.github/workflows/phpunit-pgsql.yml
@@ -5,25 +5,7 @@
name: PHPUnit pgsql
-on:
- pull_request:
- paths:
- - '.github/workflows/**'
- - 'appinfo/**'
- - 'lib/**'
- - 'templates/**'
- - 'tests/**'
- - 'vendor/**'
- - 'vendor-bin/**'
- - '.php-cs-fixer.dist.php'
- - 'composer.json'
- - 'composer.lock'
-
- push:
- branches:
- - main
- - master
- - stable*
+on: pull_request
permissions:
contents: read
@@ -33,13 +15,53 @@ 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-low
+
+ outputs:
+ src: ${{ steps.changes.outputs.src}}
+
+ steps:
+ - uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0.0
+ id: changes
+ continue-on-error: true
+ with:
+ filters: |
+ src:
+ - '.github/workflows/**'
+ - 'appinfo/**'
+ - 'lib/**'
+ - 'templates/**'
+ - 'tests/**'
+ - 'vendor/**'
+ - 'vendor-bin/**'
+ - '.php-cs-fixer.dist.php'
+ - 'composer.json'
+ - 'composer.lock'
+
phpunit-pgsql:
runs-on: ubuntu-latest
+ needs: [changes, matrix]
+ if: needs.changes.outputs.src != 'false'
+
strategy:
matrix:
- php-versions: ['8.0']
- server-versions: ['master']
+ php-versions: ${{ fromJson(needs.matrix.outputs.php-max) }}
+ server-versions: ${{ fromJson(needs.matrix.outputs.server-max) }}
services:
postgres:
@@ -59,19 +81,19 @@ jobs:
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
- name: Checkout server
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
+ uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: true
repository: nextcloud/server
ref: ${{ matrix.server-versions }}
- name: Checkout app
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
+ uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
path: apps/${{ env.APP_NAME }}
- 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 }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -83,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
@@ -147,8 +169,8 @@ jobs:
summary:
permissions:
contents: none
- runs-on: ubuntu-latest
- needs: phpunit-pgsql
+ runs-on: ubuntu-latest-low
+ needs: [changes, phpunit-pgsql]
if: always()
@@ -156,4 +178,4 @@ jobs:
steps:
- name: Summary status
- run: if ${{ needs.phpunit-pgsql.result != 'success' }}; then exit 1; fi
\ No newline at end of file
+ run: if ${{ needs.changes.outputs.src != 'false' && needs.phpunit-pgsql.result != 'success' }}; then exit 1; fi
diff --git a/.github/workflows/phpunit-sqlite.yml b/.github/workflows/phpunit-sqlite.yml
index d613117fa..1deb1bdd5 100644
--- a/.github/workflows/phpunit-sqlite.yml
+++ b/.github/workflows/phpunit-sqlite.yml
@@ -5,25 +5,7 @@
name: PHPUnit sqlite
-on:
- pull_request:
- paths:
- - '.github/workflows/**'
- - 'appinfo/**'
- - 'lib/**'
- - 'templates/**'
- - 'tests/**'
- - 'vendor/**'
- - 'vendor-bin/**'
- - '.php-cs-fixer.dist.php'
- - 'composer.json'
- - 'composer.lock'
-
- push:
- branches:
- - main
- - master
- - stable*
+on: pull_request
permissions:
contents: read
@@ -33,13 +15,53 @@ 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-low
+
+ outputs:
+ src: ${{ steps.changes.outputs.src}}
+
+ steps:
+ - uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0.0
+ id: changes
+ continue-on-error: true
+ with:
+ filters: |
+ src:
+ - '.github/workflows/**'
+ - 'appinfo/**'
+ - 'lib/**'
+ - 'templates/**'
+ - 'tests/**'
+ - 'vendor/**'
+ - 'vendor-bin/**'
+ - '.php-cs-fixer.dist.php'
+ - 'composer.json'
+ - 'composer.lock'
+
phpunit-sqlite:
runs-on: ubuntu-latest
+ needs: [changes, matrix]
+ if: needs.changes.outputs.src != 'false'
+
strategy:
matrix:
- php-versions: ['8.0']
- server-versions: ['master']
+ php-versions: ${{ fromJson(needs.matrix.outputs.php-max) }}
+ server-versions: ${{ fromJson(needs.matrix.outputs.server-max) }}
steps:
- name: Set app env
@@ -48,19 +70,19 @@ jobs:
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
- name: Checkout server
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
+ uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: true
repository: nextcloud/server
ref: ${{ matrix.server-versions }}
- name: Checkout app
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
+ uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
path: apps/${{ env.APP_NAME }}
- name: Set up php ${{ matrix.php-versions }}
- uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # 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
@@ -72,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
@@ -136,8 +158,8 @@ jobs:
summary:
permissions:
contents: none
- runs-on: ubuntu-latest
- needs: phpunit-sqlite
+ runs-on: ubuntu-latest-low
+ needs: [changes, phpunit-sqlite]
if: always()
@@ -145,4 +167,4 @@ jobs:
steps:
- name: Summary status
- run: if ${{ needs.phpunit-sqlite.result != 'success' }}; then exit 1; fi
+ run: if ${{ needs.changes.outputs.src != 'false' && needs.phpunit-sqlite.result != 'success' }}; then exit 1; fi
diff --git a/.github/workflows/pr-feedback.yml b/.github/workflows/pr-feedback.yml
index ea40f7943..0e7359dec 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 7be48f261..ff526a2a0 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@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
+ uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- - name: Set up php
- uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # 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 d9b9532e1..b71c21a38 100644
--- a/.github/workflows/update-nextcloud-ocp.yml
+++ b/.github/workflows/update-nextcloud-ocp.yml
@@ -17,57 +17,90 @@ jobs:
strategy:
fail-fast: false
matrix:
- branches: ["main", "master", "stable28", "stable27", "stable26"]
+ branches: ['main', 'master', 'stable28', 'stable27', 'stable26']
name: update-nextcloud-ocp-${{ matrix.branches }}
steps:
- - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
+ - id: checkout
+ uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ matrix.branches }}
submodules: true
+ continue-on-error: true
- - name: Set up php8.1
- uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2
+ - name: Set up php8.2
+ if: steps.checkout.outcome == 'success'
+ uses: shivammathur/setup-php@6d7209f44a25a59e904b1ee9f3b0c33ab2cd888d # v2
with:
- php-version: 8.1
+ php-version: 8.2
# 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, sqlite, pdo_sqlite
coverage: none
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ - name: Read codeowners
+ if: steps.checkout.outcome == 'success'
+ id: codeowners
+ run: |
+ grep '/appinfo/info.xml' .github/CODEOWNERS | cut -f 2- -d ' ' | xargs | awk '{ print "codeowners="$0 }' >> $GITHUB_OUTPUT
+ continue-on-error: true
+
- name: Composer install
+ if: steps.checkout.outcome == 'success'
run: composer install
- name: Composer update nextcloud/ocp
- if: matrix.branches != 'main'
+ id: update_branch
+ if: ${{ steps.checkout.outcome == 'success' && matrix.branches != 'main' }}
run: composer require --dev nextcloud/ocp:dev-${{ matrix.branches }}
+ - name: Raise on issue on failure
+ uses: dacbd/create-issue-action@ba4d1c45cccf9c483f2720cefb40e437f0ee6f7d # v1.2.1
+ if: ${{ steps.checkout.outcome == 'success' && failure() && steps.update_branch.conclusion == 'failure' }}
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ title: Failed to update nextcloud/ocp package on branch ${{ matrix.branches }}
+ body: Please check the output of the GitHub action and manually resolve the issues
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
${{ steps.codeowners.outputs.codeowners }}
+
- name: Composer update nextcloud/ocp
- if: matrix.branches == 'main'
+ id: update_main
+ if: ${{ steps.checkout.outcome == 'success' && matrix.branches == 'main' }}
run: composer require --dev nextcloud/ocp:dev-master
+ - name: Raise on issue on failure
+ uses: dacbd/create-issue-action@ba4d1c45cccf9c483f2720cefb40e437f0ee6f7d # v1.2.1
+ if: ${{ steps.checkout.outcome == 'success' && failure() && steps.update_main.conclusion == 'failure' }}
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ title: Failed to update nextcloud/ocp package on branch ${{ matrix.branches }}
+ body: Please check the output of the GitHub action and manually resolve the issues
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
${{ steps.codeowners.outputs.codeowners }}
+
- name: Reset checkout 3rdparty
+ if: steps.checkout.outcome == 'success'
run: |
git clean -f 3rdparty
git checkout 3rdparty
continue-on-error: true
- name: Reset checkout vendor
+ if: steps.checkout.outcome == 'success'
run: |
git clean -f vendor
git checkout vendor
continue-on-error: true
- name: Reset checkout vendor-bin
+ if: steps.checkout.outcome == 'success'
run: |
git clean -f vendor-bin
git checkout vendor-bin
continue-on-error: true
- name: Create Pull Request
- uses: peter-evans/create-pull-request@284f54f989303d2699d373481a0cfa13ad5a6666 # v3
+ if: steps.checkout.outcome == 'success'
+ uses: peter-evans/create-pull-request@b1ddad2c994a25fbc81a28b3ec0e368bb2021c50 # v3
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
commit-message: "chore(dev-deps): Bump nextcloud/ocp package"