From 084f88bd5e2da1c95c4adb781de62ae3a053d793 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 11 Mar 2024 13:54:12 +0100 Subject: [PATCH] chore: update workflows from templates Signed-off-by: Robin Appelman --- .github/workflows/appstore-build-publish.yml | 40 +++++------ .github/workflows/lint-info-xml.yml | 14 ++-- .github/workflows/lint-php-cs.yml | 9 +-- .github/workflows/lint-php.yml | 9 +-- .github/workflows/phpunit-mysql.yml | 19 +++--- .github/workflows/phpunit-oci.yml | 21 +++--- .github/workflows/phpunit-pgsql.yml | 23 ++++--- .github/workflows/phpunit-sqlite.yml | 23 ++++--- .../phpunit-summary-when-unrelated.yml | 68 ------------------- .github/workflows/pr-feedback.yml | 2 +- .github/workflows/psalm-matrix.yml | 16 ++--- .github/workflows/release.yml | 14 ++-- .github/workflows/rust.yml | 34 ++++------ .github/workflows/update-nextcloud-ocp.yml | 49 ++++++++++--- 14 files changed, 154 insertions(+), 187 deletions(-) delete mode 100644 .github/workflows/phpunit-summary-when-unrelated.yml diff --git a/.github/workflows/appstore-build-publish.yml b/.github/workflows/appstore-build-publish.yml index f1d89f03..b31cd2ea 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 @@ -6,9 +9,6 @@ on: release: types: [published] -env: - PHP_VERSION: 8.1 - jobs: build_and_publish: runs-on: ubuntu-latest @@ -17,16 +17,14 @@ jobs: if: ${{ github.repository_owner == 'nextcloud-releases' }} steps: - ### Adjustments start ### - - uses: cachix/install-nix-action@v20 - - uses: cachix/cachix-action@v12 + - uses: cachix/install-nix-action@v26 + - uses: cachix/cachix-action@v14 with: name: notify-push authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - ### Adjustments end ### - name: Check actor permission - uses: skjnldsv/check-actor-permission@e591dbfe838300c007028e1219ca82cc26e8d7c5 # v2.1 + uses: skjnldsv/check-actor-permission@69e92a3c4711150929bca9fcf34448c5bf5526e7 # v3.0 with: require: write @@ -40,9 +38,7 @@ 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 @@ -59,12 +55,12 @@ jobs: with: path: ${{ env.APP_NAME }} fallbackNode: '^20' - fallbackNpm: '^9' + fallbackNpm: '^10' - name: Set up node ${{ steps.versions.outputs.nodeVersion }} # Skip if no package.json if: ${{ steps.versions.outputs.nodeVersion }} - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v3 + uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3 with: node-version: ${{ steps.versions.outputs.nodeVersion }} @@ -73,17 +69,23 @@ jobs: if: ${{ steps.versions.outputs.npmVersion }} run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" - - name: Set up php ${{ env.PHP_VERSION }} - uses: shivammathur/setup-php@81cd5ae0920b34eef300e1775313071038a53429 # v2 + - name: Get php version + id: php-versions + uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1 + with: + filename: ${{ env.APP_NAME }}/appinfo/info.xml + + - name: Set up php ${{ steps.php-versions.outputs.php-min }} + uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2 with: - php-version: ${{ env.PHP_VERSION }} + php-version: ${{ steps.php-versions.outputs.php-min }} coverage: none env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Check composer.json id: check_composer - uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2 + uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v2 with: files: "${{ env.APP_NAME }}/composer.json" @@ -105,7 +107,7 @@ jobs: - name: Check Krankerl config id: krankerl - uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2 + uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v2 with: files: ${{ env.APP_NAME }}/krankerl.toml @@ -159,7 +161,7 @@ jobs: tar -zcvf ${{ env.APP_NAME }}.tar.gz ${{ env.APP_NAME }} - name: Attach tarball to github release - uses: svenstaro/upload-release-action@1beeb572c19a9242f4361f4cee78f8e0d9aec5df # v2 + uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # v2 id: attach_to_release with: repo_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/lint-info-xml.yml b/.github/workflows/lint-info-xml.yml index 7b9e1c99..492e8a01 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 @@ -22,18 +16,18 @@ concurrency: jobs: xml-linters: - runs-on: ubuntu-latest + runs-on: ubuntu-latest-low 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..1ffee780 100644 --- a/.github/workflows/lint-php-cs.yml +++ b/.github/workflows/lint-php-cs.yml @@ -26,12 +26,13 @@ jobs: - name: Get php version id: versions - uses: icewind1991/nextcloud-version-matrix@334a77e02e5684ba9da35933db0d7110356bf3ba # v1.1.0 + uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1 - - name: Set up php${{ steps.versions.outputs.php-max }} - uses: shivammathur/setup-php@81cd5ae0920b34eef300e1775313071038a53429 # v2 + - name: Set up php${{ steps.versions.outputs.php-available }} + uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2 with: - php-version: ${{ steps.versions.outputs.php-max }} + php-version: ${{ steps.versions.outputs.php-available }} + 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 4108fae6..c37ab3f7 100644 --- a/.github/workflows/lint-php.yml +++ b/.github/workflows/lint-php.yml @@ -16,7 +16,7 @@ concurrency: jobs: matrix: - runs-on: ubuntu-latest + runs-on: ubuntu-latest-low outputs: php-versions: ${{ steps.versions.outputs.php-versions }} steps: @@ -24,7 +24,7 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Get version matrix id: versions - uses: icewind1991/nextcloud-version-matrix@111919cfc7b388b7c02cac3c5d53627137adb89f # v1.0.0 + uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.0.0 php-lint: runs-on: ubuntu-latest @@ -40,9 +40,10 @@ 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@a4e22b60bbb9c1021113f2860347b0759f66fe5d # 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: @@ -54,7 +55,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/phpunit-mysql.yml b/.github/workflows/phpunit-mysql.yml index dee5bef6..0b0d486b 100644 --- a/.github/workflows/phpunit-mysql.yml +++ b/.github/workflows/phpunit-mysql.yml @@ -16,26 +16,27 @@ concurrency: jobs: matrix: - runs-on: ubuntu-latest + runs-on: ubuntu-latest-low outputs: - matrix: ${{ steps.versions.outputs.matrix }} + 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@8238a96541a763c633c093b203f3c8a33fcee037 # v1.0.0 + uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1 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@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes continue-on-error: true with: @@ -91,7 +92,7 @@ jobs: path: apps/${{ env.APP_NAME }} - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@81cd5ae0920b34eef300e1775313071038a53429 # v2 + uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2 with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation @@ -108,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 @@ -116,7 +117,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: @@ -172,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 2ae80b60..5dc0ff6c 100644 --- a/.github/workflows/phpunit-oci.yml +++ b/.github/workflows/phpunit-oci.yml @@ -16,25 +16,26 @@ concurrency: jobs: matrix: - runs-on: ubuntu-latest + runs-on: ubuntu-latest-low outputs: - php-max: ${{ steps.versions.outputs.php-max-list }} + php-version: ${{ steps.versions.outputs.php-available-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 + uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.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@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes continue-on-error: true with: @@ -59,9 +60,11 @@ jobs: strategy: matrix: - php-versions: ${{ fromJson(needs.matrix.outputs.php-max) }} + php-versions: ${{ fromJson(needs.matrix.outputs.php-version) }} server-versions: ${{ fromJson(needs.matrix.outputs.server-max) }} + name: OCI PHP ${{ matrix.php-versions }} Nextcloud ${{ matrix.server-versions }} + services: oracle: image: ghcr.io/gvenzl/oracle-xe:11 @@ -102,7 +105,7 @@ jobs: path: apps/${{ env.APP_NAME }} - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@81cd5ae0920b34eef300e1775313071038a53429 # v2 + uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2 with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation @@ -114,7 +117,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 @@ -178,7 +181,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 f8ef7569..a9991165 100644 --- a/.github/workflows/phpunit-pgsql.yml +++ b/.github/workflows/phpunit-pgsql.yml @@ -3,7 +3,7 @@ # https://github.com/nextcloud/.github # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization -name: PHPUnit pgsql +name: PHPUnit PostgreSQL on: pull_request @@ -16,25 +16,26 @@ concurrency: jobs: matrix: - runs-on: ubuntu-latest + runs-on: ubuntu-latest-low outputs: - php-max: ${{ steps.versions.outputs.php-max-list }} + php-version: ${{ steps.versions.outputs.php-available-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 + uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.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@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes continue-on-error: true with: @@ -59,9 +60,11 @@ jobs: strategy: matrix: - php-versions: ${{ fromJson(needs.matrix.outputs.php-max) }} + php-versions: ${{ fromJson(needs.matrix.outputs.php-version) }} server-versions: ${{ fromJson(needs.matrix.outputs.server-max) }} + name: PostgreSQL PHP ${{ matrix.php-versions }} Nextcloud ${{ matrix.server-versions }} + services: postgres: image: ghcr.io/nextcloud/continuous-integration-postgres-14:latest @@ -92,7 +95,7 @@ jobs: path: apps/${{ env.APP_NAME }} - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@81cd5ae0920b34eef300e1775313071038a53429 # v2 + uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2 with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation @@ -104,7 +107,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 @@ -168,7 +171,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 8bd69de0..36948d1c 100644 --- a/.github/workflows/phpunit-sqlite.yml +++ b/.github/workflows/phpunit-sqlite.yml @@ -3,7 +3,7 @@ # https://github.com/nextcloud/.github # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization -name: PHPUnit sqlite +name: PHPUnit SQLite on: pull_request @@ -16,25 +16,26 @@ concurrency: jobs: matrix: - runs-on: ubuntu-latest + runs-on: ubuntu-latest-low outputs: - php-max: ${{ steps.versions.outputs.php-max-list }} + php-version: ${{ steps.versions.outputs.php-available-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 + uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.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@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 id: changes continue-on-error: true with: @@ -59,9 +60,11 @@ jobs: strategy: matrix: - php-versions: ${{ fromJson(needs.matrix.outputs.php-max) }} + php-versions: ${{ fromJson(needs.matrix.outputs.php-version) }} server-versions: ${{ fromJson(needs.matrix.outputs.server-max) }} + name: SQLite PHP ${{ matrix.php-versions }} Nextcloud ${{ matrix.server-versions }} + steps: - name: Set app env run: | @@ -81,7 +84,7 @@ jobs: path: apps/${{ env.APP_NAME }} - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@81cd5ae0920b34eef300e1775313071038a53429 # v2 + uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # 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 +96,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,7 +160,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/phpunit-summary-when-unrelated.yml b/.github/workflows/phpunit-summary-when-unrelated.yml deleted file mode 100644 index 484fdbb5..00000000 --- a/.github/workflows/phpunit-summary-when-unrelated.yml +++ /dev/null @@ -1,68 +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 - -name: PHPUnit summary - -on: - pull_request: - paths-ignore: - - '.github/workflows/**' - - 'appinfo/**' - - 'lib/**' - - 'templates/**' - - 'tests/**' - - 'vendor/**' - - 'vendor-bin/**' - - '.php-cs-fixer.dist.php' - - 'composer.json' - - 'composer.lock' - -permissions: - contents: read - -jobs: - summary-mysql: - permissions: - contents: none - runs-on: ubuntu-latest - - name: phpunit-mysql-summary - - steps: - - name: Summary status - run: 'echo "No PHP files changed, skipped PHPUnit"' - - summary-oci: - permissions: - contents: none - runs-on: ubuntu-latest - - name: phpunit-oci-summary - - steps: - - name: Summary status - run: 'echo "No PHP files changed, skipped PHPUnit"' - - summary-pgsql: - permissions: - contents: none - runs-on: ubuntu-latest - - name: phpunit-pgsql-summary - - steps: - - name: Summary status - run: 'echo "No PHP files changed, skipped PHPUnit"' - - summary-sqlite: - permissions: - contents: none - runs-on: ubuntu-latest - - name: phpunit-sqlite-summary - - steps: - - name: Summary status - run: 'echo "No PHP files changed, skipped PHPUnit"' 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..4ee30b7e 100644 --- a/.github/workflows/psalm-matrix.yml +++ b/.github/workflows/psalm-matrix.yml @@ -13,7 +13,7 @@ concurrency: jobs: matrix: - runs-on: ubuntu-latest + runs-on: ubuntu-latest-low outputs: ocp-matrix: ${{ steps.versions.outputs.ocp-matrix }} steps: @@ -21,7 +21,7 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Get version matrix id: versions - uses: icewind1991/nextcloud-version-matrix@334a77e02e5684ba9da35933db0d7110356bf3ba # v1.1.0 + uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1 static-analysis: runs-on: ubuntu-latest @@ -31,32 +31,32 @@ jobs: fail-fast: false matrix: ${{ fromJson(needs.matrix.outputs.ocp-matrix) }} - 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 + uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # 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, redis 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 summary: - runs-on: ubuntu-latest + runs-on: ubuntu-latest-low needs: static-analysis if: always() diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4362c100..3ffc0810 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,12 +9,12 @@ env: jobs: matrix: - runs-on: ubuntu-latest + runs-on: ubuntu-latest-low outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v20 + - uses: cachix/install-nix-action@v26 - id: set-matrix run: echo "matrix={\"target\":$(nix eval --json ".#targets.x86_64-linux")}" | tee $GITHUB_OUTPUT @@ -26,8 +26,8 @@ jobs: matrix: ${{fromJson(needs.matrix.outputs.matrix)}} steps: - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v20 - - uses: cachix/cachix-action@v12 + - uses: cachix/install-nix-action@v26 + - uses: cachix/cachix-action@v14 with: name: notify-push authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' @@ -47,7 +47,7 @@ jobs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v20 + - uses: cachix/install-nix-action@v26 - id: set-matrix run: echo "matrix=$(nix eval --json ".#testClientMatrix.x86_64-linux")" | tee $GITHUB_OUTPUT @@ -60,8 +60,8 @@ jobs: matrix: ${{fromJson(needs.test-client-matrix.outputs.matrix)}} steps: - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v20 - - uses: cachix/cachix-action@v12 + - uses: cachix/install-nix-action@v26 + - uses: cachix/cachix-action@v14 with: name: notify-push authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b7f0db51..62b7f939 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,12 +1,6 @@ name: Rust CI -on: - pull_request: - push: - branches: - - main - - master - - stable* +on: pull_request permissions: contents: read @@ -19,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v25 + - uses: cachix/install-nix-action@v26 - uses: cachix/cachix-action@v14 with: name: notify-push @@ -31,7 +25,7 @@ jobs: needs: check steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v25 + - uses: cachix/install-nix-action@v26 - uses: cachix/cachix-action@v14 with: name: notify-push @@ -43,7 +37,7 @@ jobs: needs: check steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v25 + - uses: cachix/install-nix-action@v26 - uses: cachix/cachix-action@v14 with: name: notify-push @@ -51,12 +45,12 @@ jobs: - run: nix build .#test matrix: - runs-on: ubuntu-latest + runs-on: ubuntu-latest-low outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v25 + - uses: cachix/install-nix-action@v26 - id: set-matrix run: echo "matrix={\"target\":$(nix eval --json ".#targets.x86_64-linux")}" | tee $GITHUB_OUTPUT @@ -68,7 +62,7 @@ jobs: matrix: ${{fromJson(needs.matrix.outputs.matrix)}} steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v25 + - uses: cachix/install-nix-action@v26 - uses: cachix/cachix-action@v14 with: name: notify-push @@ -84,7 +78,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v25 + - uses: cachix/install-nix-action@v26 - uses: cachix/cachix-action@v14 with: name: notify-push @@ -96,7 +90,7 @@ jobs: needs: test-client-check steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v25 + - uses: cachix/install-nix-action@v26 - uses: cachix/cachix-action@v14 with: name: notify-push @@ -104,12 +98,12 @@ jobs: - run: nix build .#test_client-clippy test-client-matrix: - runs-on: ubuntu-latest + runs-on: ubuntu-latest-low outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v25 + - uses: cachix/install-nix-action@v26 - id: set-matrix run: echo "matrix=$(nix eval --json ".#testClientMatrix.x86_64-linux")" | tee $GITHUB_OUTPUT @@ -122,7 +116,7 @@ jobs: matrix: ${{fromJson(needs.test-client-matrix.outputs.matrix)}} steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v25 + - uses: cachix/install-nix-action@v26 - uses: cachix/cachix-action@v14 with: name: notify-push @@ -139,7 +133,7 @@ jobs: needs: check steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v25 + - uses: cachix/install-nix-action@v26 - uses: cachix/cachix-action@v14 with: name: notify-push @@ -151,7 +145,7 @@ jobs: runs-on: ubuntu-latest needs: build steps: - - uses: cachix/install-nix-action@v25 + - uses: cachix/install-nix-action@v26 - uses: cachix/cachix-action@v14 with: name: notify-push diff --git a/.github/workflows/update-nextcloud-ocp.yml b/.github/workflows/update-nextcloud-ocp.yml index e40744d3..2d65b440 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@a4e22b60bbb9c1021113f2860347b0759f66fe5d # 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@cdb57ab6ff8862aa09fee2be6ba77a59581921c2 # v2.0.0 + 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@cdb57ab6ff8862aa09fee2be6ba77a59581921c2 # v2.0.0 + 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@a4f52f8033a6168103c2538976c07b467e8163bc # v6.0.1 with: token: ${{ secrets.COMMAND_BOT_PAT }} commit-message: "chore(dev-deps): Bump nextcloud/ocp package"