diff --git a/.github/workflows/appstore-build-publish.yml b/.github/workflows/appstore-build-publish.yml index f1d89f03..5584a36e 100644 --- a/.github/workflows/appstore-build-publish.yml +++ b/.github/workflows/appstore-build-publish.yml @@ -1,4 +1,7 @@ -# This workflow is adjusted compared to the one from the template to setup rust+cross +# 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: Build and publish app release @@ -7,7 +10,7 @@ on: types: [published] env: - PHP_VERSION: 8.1 + PHP_VERSION: 8.2 jobs: build_and_publish: @@ -17,14 +20,6 @@ jobs: if: ${{ github.repository_owner == 'nextcloud-releases' }} steps: - ### Adjustments start ### - - uses: cachix/install-nix-action@v20 - - uses: cachix/cachix-action@v12 - with: - name: notify-push - authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - ### Adjustments end ### - - name: Check actor permission uses: skjnldsv/check-actor-permission@e591dbfe838300c007028e1219ca82cc26e8d7c5 # v2.1 with: @@ -40,9 +35,6 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: path: ${{ env.APP_NAME }} - ### Adjustment start ### - fetch-depth: 0 - ### Adjustment end ### - name: Get appinfo data id: appinfo @@ -74,7 +66,7 @@ jobs: run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" - name: Set up php ${{ env.PHP_VERSION }} - uses: shivammathur/setup-php@81cd5ae0920b34eef300e1775313071038a53429 # v2 + uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2 with: php-version: ${{ env.PHP_VERSION }} coverage: none diff --git a/.github/workflows/lint-info-xml.yml b/.github/workflows/lint-info-xml.yml index 7b9e1c99..bf6f1787 100644 --- a/.github/workflows/lint-info-xml.yml +++ b/.github/workflows/lint-info-xml.yml @@ -5,13 +5,7 @@ name: Lint info.xml -on: - pull_request: - push: - branches: - - main - - master - - stable* +on: pull_request permissions: contents: read @@ -27,13 +21,13 @@ jobs: name: info.xml lint steps: - name: Checkout - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Download schema run: wget https://raw.githubusercontent.com/nextcloud/appstore/master/nextcloudappstore/api/v1/release/info.xsd - name: Lint info.xml - uses: ChristophWurst/xmllint-action@39155a91429af431d65fafc21fa52ba5c4f5cb71 # v1.1 + uses: ChristophWurst/xmllint-action@36f2a302f84f8c83fceea0b9c59e1eb4a616d3c1 # v1.2 with: xml-file: ./appinfo/info.xml xml-schema-file: ./info.xsd diff --git a/.github/workflows/lint-php-cs.yml b/.github/workflows/lint-php-cs.yml index 6887055c..163706ea 100644 --- a/.github/workflows/lint-php-cs.yml +++ b/.github/workflows/lint-php-cs.yml @@ -24,14 +24,10 @@ jobs: - name: Checkout uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Get php version - id: versions - uses: icewind1991/nextcloud-version-matrix@334a77e02e5684ba9da35933db0d7110356bf3ba # v1.1.0 - - - name: Set up php${{ steps.versions.outputs.php-max }} - uses: shivammathur/setup-php@81cd5ae0920b34eef300e1775313071038a53429 # v2 + - name: Set up php8.2 + uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2 with: - php-version: ${{ steps.versions.outputs.php-max }} + php-version: 8.2 coverage: none ini-file: development env: diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml index 4108fae6..dfe72467 100644 --- a/.github/workflows/lint-php.yml +++ b/.github/workflows/lint-php.yml @@ -15,23 +15,11 @@ concurrency: cancel-in-progress: true jobs: - matrix: - runs-on: ubuntu-latest - outputs: - php-versions: ${{ steps.versions.outputs.php-versions }} - steps: - - name: Checkout app - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Get version matrix - id: versions - uses: icewind1991/nextcloud-version-matrix@111919cfc7b388b7c02cac3c5d53627137adb89f # v1.0.0 - php-lint: runs-on: ubuntu-latest - needs: matrix strategy: matrix: - php-versions: ${{fromJson(needs.matrix.outputs.php-versions)}} + php-versions: [ '8.0', '8.1', '8.2', '8.3' ] name: php-lint @@ -40,7 +28,7 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@81cd5ae0920b34eef300e1775313071038a53429 # v2 + uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2 with: php-version: ${{ matrix.php-versions }} coverage: none diff --git a/.github/workflows/phpunit-mysql.yml b/.github/workflows/phpunit-mysql.yml index dee5bef6..b7029d51 100644 --- a/.github/workflows/phpunit-mysql.yml +++ b/.github/workflows/phpunit-mysql.yml @@ -15,19 +15,6 @@ concurrency: cancel-in-progress: true jobs: - matrix: - runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.versions.outputs.matrix }} - steps: - - name: Checkout app - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Get version matrix - id: versions - uses: icewind1991/nextcloud-version-matrix@8238a96541a763c633c093b203f3c8a33fcee037 # v1.0.0 - with: - matrix: '{"mysql-versions": ["8.1"]}' - changes: runs-on: ubuntu-latest @@ -55,11 +42,14 @@ jobs: phpunit-mysql: runs-on: ubuntu-latest - needs: [changes, matrix] + needs: changes if: needs.changes.outputs.src != 'false' strategy: - matrix: ${{ fromJson(needs.matrix.outputs.matrix) }} + matrix: + php-versions: ['8.0', '8.1', '8.2', '8.3'] + server-versions: ['master'] + mysql-versions: ['8.1'] name: MySQL ${{ matrix.mysql-versions }} PHP ${{ matrix.php-versions }} Nextcloud ${{ matrix.server-versions }} @@ -91,7 +81,7 @@ jobs: path: apps/${{ env.APP_NAME }} - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@81cd5ae0920b34eef300e1775313071038a53429 # v2 + uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2 with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation @@ -116,7 +106,7 @@ jobs: # Only run if phpunit config file exists if: steps.check_composer.outputs.files_exists == 'true' working-directory: apps/${{ env.APP_NAME }} - run: rm composer.lock && composer i + run: composer i - name: Set up Nextcloud env: diff --git a/.github/workflows/phpunit-oci.yml b/.github/workflows/phpunit-oci.yml index 2ae80b60..e1ae2032 100644 --- a/.github/workflows/phpunit-oci.yml +++ b/.github/workflows/phpunit-oci.yml @@ -15,18 +15,6 @@ concurrency: cancel-in-progress: true jobs: - matrix: - runs-on: ubuntu-latest - 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@c2bf575a3516752db5ce2915499d3f694885e2c7 # v1.0.0 - changes: runs-on: ubuntu-latest @@ -54,13 +42,13 @@ jobs: phpunit-oci: runs-on: ubuntu-22.04 - needs: [changes, matrix] + needs: changes if: needs.changes.outputs.src != 'false' strategy: matrix: - php-versions: ${{ fromJson(needs.matrix.outputs.php-max) }} - server-versions: ${{ fromJson(needs.matrix.outputs.server-max) }} + php-versions: ['8.2'] + server-versions: ['master'] services: oracle: @@ -102,7 +90,7 @@ jobs: path: apps/${{ env.APP_NAME }} - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@81cd5ae0920b34eef300e1775313071038a53429 # v2 + uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2 with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation diff --git a/.github/workflows/phpunit-pgsql.yml b/.github/workflows/phpunit-pgsql.yml index f8ef7569..45a82163 100644 --- a/.github/workflows/phpunit-pgsql.yml +++ b/.github/workflows/phpunit-pgsql.yml @@ -15,18 +15,6 @@ concurrency: cancel-in-progress: true jobs: - matrix: - runs-on: ubuntu-latest - 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@c2bf575a3516752db5ce2915499d3f694885e2c7 # v1.0.0 - changes: runs-on: ubuntu-latest @@ -54,13 +42,13 @@ jobs: phpunit-pgsql: runs-on: ubuntu-latest - needs: [changes, matrix] + needs: changes if: needs.changes.outputs.src != 'false' strategy: matrix: - php-versions: ${{ fromJson(needs.matrix.outputs.php-max) }} - server-versions: ${{ fromJson(needs.matrix.outputs.server-max) }} + php-versions: ['8.2'] + server-versions: ['master'] services: postgres: @@ -92,7 +80,7 @@ jobs: path: apps/${{ env.APP_NAME }} - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@81cd5ae0920b34eef300e1775313071038a53429 # v2 + uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2 with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation diff --git a/.github/workflows/phpunit-sqlite.yml b/.github/workflows/phpunit-sqlite.yml index 8bd69de0..ed1151ab 100644 --- a/.github/workflows/phpunit-sqlite.yml +++ b/.github/workflows/phpunit-sqlite.yml @@ -15,18 +15,6 @@ concurrency: cancel-in-progress: true jobs: - matrix: - runs-on: ubuntu-latest - 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@c2bf575a3516752db5ce2915499d3f694885e2c7 # v1.0.0 - changes: runs-on: ubuntu-latest @@ -54,13 +42,13 @@ jobs: phpunit-sqlite: runs-on: ubuntu-latest - needs: [changes, matrix] + needs: changes if: needs.changes.outputs.src != 'false' strategy: matrix: - php-versions: ${{ fromJson(needs.matrix.outputs.php-max) }} - server-versions: ${{ fromJson(needs.matrix.outputs.server-max) }} + php-versions: ['8.2'] + server-versions: ['master'] steps: - name: Set app env @@ -81,7 +69,7 @@ jobs: path: apps/${{ env.APP_NAME }} - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@81cd5ae0920b34eef300e1775313071038a53429 # v2 + uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2 with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation diff --git a/.github/workflows/pr-feedback.yml b/.github/workflows/pr-feedback.yml index 559e183f..0e7359de 100644 --- a/.github/workflows/pr-feedback.yml +++ b/.github/workflows/pr-feedback.yml @@ -30,5 +30,5 @@ jobs: 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 }},nextcloud-command,nextcloud-android-bot" + exempt-authors: "${{ steps.scrape.outputs.users }},nextcloud-command,nextcloud-android-bot,skjnldsv,datenangebot" exempt-bots: true diff --git a/.github/workflows/psalm-matrix.yml b/.github/workflows/psalm-matrix.yml index b76c5098..317e5a7f 100644 --- a/.github/workflows/psalm-matrix.yml +++ b/.github/workflows/psalm-matrix.yml @@ -12,45 +12,33 @@ concurrency: cancel-in-progress: true jobs: - matrix: - runs-on: ubuntu-latest - outputs: - ocp-matrix: ${{ steps.versions.outputs.ocp-matrix }} - steps: - - name: Checkout app - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Get version matrix - id: versions - uses: icewind1991/nextcloud-version-matrix@334a77e02e5684ba9da35933db0d7110356bf3ba # v1.1.0 - static-analysis: runs-on: ubuntu-latest - needs: matrix strategy: # do not stop on another job's failure fail-fast: false - matrix: ${{ fromJson(needs.matrix.outputs.ocp-matrix) }} + matrix: + ocp-version: [ 'dev-master', 'dev-stable28', 'dev-stable27', 'dev-stable26' ] - name: Nextcloud ${{ matrix.ocp-version }} + name: static-psalm-analysis ${{ matrix.ocp-version }} steps: - name: Checkout uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Set up php${{ matrix.php-versions }} - uses: shivammathur/setup-php@81cd5ae0920b34eef300e1775313071038a53429 # v2 + - name: Set up php8.2 + uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2 with: - php-version: ${{ matrix.php-versions }} + php-version: 8.2 coverage: none ini-file: development - extensions: redis env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Install dependencies - run: rm composer.lock && composer i + run: composer i - name: Install dependencies - run: rm composer.lock && composer require --dev nextcloud/ocp:${{ matrix.ocp-version }} --ignore-platform-reqs --with-dependencies + run: composer require --dev nextcloud/ocp:${{ matrix.ocp-version }} --ignore-platform-reqs --with-dependencies - name: Run coding standards check run: composer run psalm diff --git a/.github/workflows/update-nextcloud-ocp.yml b/.github/workflows/update-nextcloud-ocp.yml index e40744d3..a3945d5e 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", "stable27", "stable26", "stable25"] + 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@e6f75134d35752277f093989e72e140eaa222f35 # 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@153407881ec5c347639a548ade7d8ad1d6740e38 # v3 with: token: ${{ secrets.COMMAND_BOT_PAT }} commit-message: "chore(dev-deps): Bump nextcloud/ocp package"