chore: update workflows from templates

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2024-08-06 22:41:15 +02:00
parent 8b109344be
commit c7a9eec724
17 changed files with 326 additions and 214 deletions

View File

@@ -2,6 +2,9 @@
# #
# https://github.com/nextcloud/.github # https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
#
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT
name: Dependabot name: Dependabot
@@ -21,14 +24,20 @@ concurrency:
jobs: jobs:
auto-approve-merge: auto-approve-merge:
if: github.actor == 'dependabot[bot]' if: github.actor == 'dependabot[bot]' || github.actor == 'renovate[bot]'
runs-on: ubuntu-latest runs-on: ubuntu-latest-low
permissions: permissions:
# for hmarr/auto-approve-action to approve PRs # for hmarr/auto-approve-action to approve PRs
pull-requests: write pull-requests: write
steps: steps:
# Github actions bot approve - name: Disabled on forks
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
run: |
echo 'Can not approve PRs from forks'
exit 1
# GitHub actions bot approve
- uses: hmarr/auto-approve-action@b40d6c9ed2fa10c9a2749eca7eb004418a705501 # v2 - uses: hmarr/auto-approve-action@b40d6c9ed2fa10c9a2749eca7eb004418a705501 # v2
with: with:
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -2,6 +2,9 @@
# #
# https://github.com/nextcloud/.github # https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
#
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT
name: Block fixup and squash commits name: Block fixup and squash commits
@@ -24,7 +27,7 @@ jobs:
pull-requests: write pull-requests: write
name: Block fixup and squash commits name: Block fixup and squash commits
runs-on: ubuntu-latest runs-on: ubuntu-latest-low
steps: steps:
- name: Run check - name: Run check

View File

@@ -20,6 +20,9 @@ concurrency:
jobs: jobs:
changes: changes:
runs-on: ubuntu-latest-low runs-on: ubuntu-latest-low
permissions:
contents: read
pull-requests: read
outputs: outputs:
src: ${{ steps.changes.outputs.src}} src: ${{ steps.changes.outputs.src}}
@@ -63,12 +66,12 @@ jobs:
fallbackNpm: '^10' fallbackNpm: '^10'
- name: Set up node ${{ steps.versions.outputs.nodeVersion }} - name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v3 uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with: with:
node-version: ${{ steps.versions.outputs.nodeVersion }} node-version: ${{ steps.versions.outputs.nodeVersion }}
- name: Set up npm ${{ steps.versions.outputs.npmVersion }} - name: Set up npm ${{ steps.versions.outputs.npmVersion }}
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
- name: Install dependencies - name: Install dependencies
env: env:

View File

@@ -2,6 +2,9 @@
# #
# https://github.com/nextcloud/.github # https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
#
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT
name: Lint php-cs name: Lint php-cs
@@ -24,10 +27,15 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up php8.2 - name: Get php version
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2 id: versions
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
- name: Set up php${{ steps.versions.outputs.php-available }}
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
with: with:
php-version: 8.2 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 coverage: none
ini-file: development ini-file: development
env: env:

View File

@@ -2,6 +2,9 @@
# #
# https://github.com/nextcloud/.github # https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
#
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT
name: Lint php name: Lint php
@@ -15,11 +18,23 @@ concurrency:
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
matrix:
runs-on: ubuntu-latest-low
outputs:
php-versions: ${{ steps.versions.outputs.php-versions }}
steps:
- name: Checkout app
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Get version matrix
id: versions
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.0.0
php-lint: php-lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: matrix
strategy: strategy:
matrix: matrix:
php-versions: [ '8.1', '8.2', '8.3' ] php-versions: ${{fromJson(needs.matrix.outputs.php-versions)}}
name: php-lint name: php-lint
@@ -28,9 +43,10 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up php ${{ matrix.php-versions }} - name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2 uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
with: with:
php-version: ${{ matrix.php-versions }} 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 coverage: none
ini-file: development ini-file: development
env: env:
@@ -42,7 +58,7 @@ jobs:
summary: summary:
permissions: permissions:
contents: none contents: none
runs-on: ubuntu-latest runs-on: ubuntu-latest-low
needs: php-lint needs: php-lint
if: always() if: always()

View File

@@ -2,6 +2,9 @@
# #
# https://github.com/nextcloud/.github # https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
#
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT
name: Lint stylelint name: Lint stylelint
@@ -29,15 +32,15 @@ jobs:
id: versions id: versions
with: with:
fallbackNode: '^20' fallbackNode: '^20'
fallbackNpm: '^9' fallbackNpm: '^10'
- name: Set up node ${{ steps.versions.outputs.nodeVersion }} - name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v3 uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with: with:
node-version: ${{ steps.versions.outputs.nodeVersion }} node-version: ${{ steps.versions.outputs.nodeVersion }}
- name: Set up npm ${{ steps.versions.outputs.npmVersion }} - name: Set up npm ${{ steps.versions.outputs.npmVersion }}
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
- name: Install dependencies - name: Install dependencies
env: env:

View File

@@ -2,6 +2,9 @@
# #
# https://github.com/nextcloud/.github # https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
#
# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT
name: Npm audit fix and compile name: Npm audit fix and compile
@@ -33,19 +36,19 @@ jobs:
id: versions id: versions
with: with:
fallbackNode: '^20' fallbackNode: '^20'
fallbackNpm: '^9' fallbackNpm: '^10'
- name: Set up node ${{ steps.versions.outputs.nodeVersion }} - name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v3 uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with: with:
node-version: ${{ steps.versions.outputs.nodeVersion }} node-version: ${{ steps.versions.outputs.nodeVersion }}
- name: Set up npm ${{ steps.versions.outputs.npmVersion }} - name: Set up npm ${{ steps.versions.outputs.npmVersion }}
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
- name: Fix npm audit - name: Fix npm audit
run: | id: npm-audit
npm audit fix uses: nextcloud-libraries/npm-audit-action@2a60bd2e79cc77f2cc4d9a3fe40f1a69896f3a87 # v0.1.0
- name: Run npm ci and npm run build - name: Run npm ci and npm run build
if: always() if: always()
@@ -57,17 +60,16 @@ jobs:
- name: Create Pull Request - name: Create Pull Request
if: always() if: always()
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v5 uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
with: with:
token: ${{ secrets.COMMAND_BOT_PAT }} token: ${{ secrets.COMMAND_BOT_PAT }}
commit-message: "chore(deps): fix npm audit" commit-message: 'fix(deps): Fix npm audit'
committer: GitHub <noreply@github.com> committer: GitHub <noreply@github.com>
author: nextcloud-command <nextcloud-command@users.noreply.github.com> author: nextcloud-command <nextcloud-command@users.noreply.github.com>
signoff: true signoff: true
branch: automated/noid/${{ matrix.branches }}-fix-npm-audit branch: automated/noid/${{ matrix.branches }}-fix-npm-audit
title: "[${{ matrix.branches }}] Fix npm audit" title: '[${{ matrix.branches }}] Fix npm audit'
body: | body: ${{ steps.npm-audit.outputs.markdown }}
Auto-generated fix of npm audit
labels: | labels: |
dependencies dependencies
3. to review 3. to review

View File

@@ -2,6 +2,9 @@
# #
# https://github.com/nextcloud/.github # https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
#
# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT
name: PHPUnit MySQL name: PHPUnit MySQL
@@ -27,10 +30,13 @@ jobs:
id: versions id: versions
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1 uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
with: with:
matrix: '{"mysql-versions": ["8.1"]}' matrix: '{"mysql-versions": ["8.4"]}'
changes: changes:
runs-on: ubuntu-latest-low runs-on: ubuntu-latest-low
permissions:
contents: read
pull-requests: read
outputs: outputs:
src: ${{ steps.changes.outputs.src}} src: ${{ steps.changes.outputs.src}}
@@ -92,7 +98,7 @@ jobs:
path: apps/${{ env.APP_NAME }} path: apps/${{ env.APP_NAME }}
- name: Set up php ${{ matrix.php-versions }} - name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2 uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -105,7 +111,7 @@ jobs:
- name: Enable ONLY_FULL_GROUP_BY MySQL option - name: Enable ONLY_FULL_GROUP_BY MySQL option
run: | run: |
echo "SET GLOBAL sql_mode=(SELECT CONCAT(@@sql_mode,',ONLY_FULL_GROUP_BY'));" | mysql -h 127.0.0.1 -P 4444 -u root -prootpassword echo "SET GLOBAL sql_mode=(SELECT CONCAT(@@sql_mode,',ONLY_FULL_GROUP_BY'));" | mysql -h 127.0.0.1 -P 4444 -u root -prootpassword
echo "SELECT @@sql_mode;" | mysql -h 127.0.0.1 -P 4444 -u root -prootpassword echo 'SELECT @@sql_mode;' | mysql -h 127.0.0.1 -P 4444 -u root -prootpassword
- name: Check composer file existence - name: Check composer file existence
id: check_composer id: check_composer
@@ -132,7 +138,7 @@ jobs:
continue-on-error: true continue-on-error: true
working-directory: apps/${{ env.APP_NAME }} working-directory: apps/${{ env.APP_NAME }}
run: | run: |
composer run --list | grep "^ test:unit " | wc -l | grep 1 composer run --list | grep '^ test:unit ' | wc -l | grep 1
- name: PHPUnit - name: PHPUnit
# Only run if phpunit config file exists # Only run if phpunit config file exists
@@ -145,7 +151,7 @@ jobs:
continue-on-error: true continue-on-error: true
working-directory: apps/${{ env.APP_NAME }} working-directory: apps/${{ env.APP_NAME }}
run: | run: |
composer run --list | grep "^ test:integration " | wc -l | grep 1 composer run --list | grep '^ test:integration ' | wc -l | grep 1
- name: Run Nextcloud - name: Run Nextcloud
# Only run if phpunit integration config file exists # Only run if phpunit integration config file exists

View File

@@ -2,8 +2,11 @@
# #
# https://github.com/nextcloud/.github # https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
#
# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT
name: PHPUnit pgsql name: PHPUnit PostgreSQL
on: pull_request on: pull_request
@@ -15,11 +18,27 @@ concurrency:
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
matrix:
runs-on: ubuntu-latest-low
outputs:
php-version: ${{ steps.versions.outputs.php-available-list }}
server-max: ${{ steps.versions.outputs.branches-max-list }}
steps:
- name: Checkout app
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Get version matrix
id: versions
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
changes: changes:
runs-on: ubuntu-latest runs-on: ubuntu-latest-low
permissions:
contents: read
pull-requests: read
outputs: outputs:
src: ${{ steps.changes.outputs.src}} src: ${{ steps.changes.outputs.src }}
steps: steps:
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
@@ -42,13 +61,15 @@ jobs:
phpunit-pgsql: phpunit-pgsql:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: changes needs: [changes, matrix]
if: needs.changes.outputs.src != 'false' if: needs.changes.outputs.src != 'false'
strategy: strategy:
matrix: matrix:
php-versions: ['8.2'] php-versions: ${{ fromJson(needs.matrix.outputs.php-version) }}
server-versions: ['master'] server-versions: ${{ fromJson(needs.matrix.outputs.server-max) }}
name: PostgreSQL PHP ${{ matrix.php-versions }} Nextcloud ${{ matrix.server-versions }}
services: services:
postgres: postgres:
@@ -80,7 +101,7 @@ jobs:
path: apps/${{ env.APP_NAME }} path: apps/${{ env.APP_NAME }}
- name: Set up php ${{ matrix.php-versions }} - name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2 uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -92,7 +113,7 @@ jobs:
- name: Check composer file existence - name: Check composer file existence
id: check_composer id: check_composer
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v2 uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
with: with:
files: apps/${{ env.APP_NAME }}/composer.json files: apps/${{ env.APP_NAME }}/composer.json
@@ -115,7 +136,7 @@ jobs:
continue-on-error: true continue-on-error: true
working-directory: apps/${{ env.APP_NAME }} working-directory: apps/${{ env.APP_NAME }}
run: | run: |
composer run --list | grep "^ test:unit " | wc -l | grep 1 composer run --list | grep '^ test:unit ' | wc -l | grep 1
- name: PHPUnit - name: PHPUnit
# Only run if phpunit config file exists # Only run if phpunit config file exists
@@ -128,7 +149,7 @@ jobs:
continue-on-error: true continue-on-error: true
working-directory: apps/${{ env.APP_NAME }} working-directory: apps/${{ env.APP_NAME }}
run: | run: |
composer run --list | grep "^ test:integration " | wc -l | grep 1 composer run --list | grep '^ test:integration ' | wc -l | grep 1
- name: Run Nextcloud - name: Run Nextcloud
# Only run if phpunit integration config file exists # Only run if phpunit integration config file exists
@@ -156,7 +177,7 @@ jobs:
summary: summary:
permissions: permissions:
contents: none contents: none
runs-on: ubuntu-latest runs-on: ubuntu-latest-low
needs: [changes, phpunit-pgsql] needs: [changes, phpunit-pgsql]
if: always() if: always()

View File

@@ -2,8 +2,11 @@
# #
# https://github.com/nextcloud/.github # https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
#
# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT
name: PHPUnit sqlite name: PHPUnit SQLite
on: pull_request on: pull_request
@@ -15,8 +18,24 @@ concurrency:
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
matrix:
runs-on: ubuntu-latest-low
outputs:
php-version: ${{ steps.versions.outputs.php-available-list }}
server-max: ${{ steps.versions.outputs.branches-max-list }}
steps:
- name: Checkout app
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Get version matrix
id: versions
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
changes: changes:
runs-on: ubuntu-latest runs-on: ubuntu-latest-low
permissions:
contents: read
pull-requests: read
outputs: outputs:
src: ${{ steps.changes.outputs.src}} src: ${{ steps.changes.outputs.src}}
@@ -42,13 +61,15 @@ jobs:
phpunit-sqlite: phpunit-sqlite:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: changes needs: [changes, matrix]
if: needs.changes.outputs.src != 'false' if: needs.changes.outputs.src != 'false'
strategy: strategy:
matrix: matrix:
php-versions: ['8.2'] php-versions: ${{ fromJson(needs.matrix.outputs.php-version) }}
server-versions: ['master'] server-versions: ${{ fromJson(needs.matrix.outputs.server-max) }}
name: SQLite PHP ${{ matrix.php-versions }} Nextcloud ${{ matrix.server-versions }}
steps: steps:
- name: Set app env - name: Set app env
@@ -69,7 +90,7 @@ jobs:
path: apps/${{ env.APP_NAME }} path: apps/${{ env.APP_NAME }}
- name: Set up php ${{ matrix.php-versions }} - name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2 uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -81,7 +102,7 @@ jobs:
- name: Check composer file existence - name: Check composer file existence
id: check_composer id: check_composer
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v2 uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
with: with:
files: apps/${{ env.APP_NAME }}/composer.json files: apps/${{ env.APP_NAME }}/composer.json
@@ -104,7 +125,7 @@ jobs:
continue-on-error: true continue-on-error: true
working-directory: apps/${{ env.APP_NAME }} working-directory: apps/${{ env.APP_NAME }}
run: | run: |
composer run --list | grep "^ test:unit " | wc -l | grep 1 composer run --list | grep '^ test:unit ' | wc -l | grep 1
- name: PHPUnit - name: PHPUnit
# Only run if phpunit config file exists # Only run if phpunit config file exists
@@ -117,7 +138,7 @@ jobs:
continue-on-error: true continue-on-error: true
working-directory: apps/${{ env.APP_NAME }} working-directory: apps/${{ env.APP_NAME }}
run: | run: |
composer run --list | grep "^ test:integration " | wc -l | grep 1 composer run --list | grep '^ test:integration ' | wc -l | grep 1
- name: Run Nextcloud - name: Run Nextcloud
# Only run if phpunit integration config file exists # Only run if phpunit integration config file exists
@@ -145,7 +166,7 @@ jobs:
summary: summary:
permissions: permissions:
contents: none contents: none
runs-on: ubuntu-latest runs-on: ubuntu-latest-low
needs: [changes, phpunit-sqlite] needs: [changes, phpunit-sqlite]
if: always() if: always()

View File

@@ -45,6 +45,6 @@ jobs:
(If you believe you should not receive this message, you can add yourself to the [blocklist](https://github.com/nextcloud/.github/blob/master/non-community-usernames.txt).) (If you believe you should not receive this message, you can add yourself to the [blocklist](https://github.com/nextcloud/.github/blob/master/non-community-usernames.txt).)
days-before-feedback: 14 days-before-feedback: 14
start-date: "2024-04-30" start-date: '2024-04-30'
exempt-authors: "${{ steps.blocklist.outputs.blocklist }},${{ steps.scrape.outputs.users }},nextcloud-command,nextcloud-android-bot" exempt-authors: '${{ steps.blocklist.outputs.blocklist }},${{ steps.scrape.outputs.users }}'
exempt-bots: true exempt-bots: true

View File

@@ -2,6 +2,9 @@
# #
# https://github.com/nextcloud/.github # https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
#
# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT
name: Static analysis name: Static analysis
@@ -20,10 +23,15 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up php8.2 - name: Get php version
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2 id: versions
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
- name: Set up php${{ steps.versions.outputs.php-available }}
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
with: with:
php-version: 8.2 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 coverage: none
ini-file: development ini-file: development
env: env:

View File

@@ -2,6 +2,9 @@
# #
# https://github.com/nextcloud/.github # https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
#
# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT
name: Auto approve nextcloud/ocp name: Auto approve nextcloud/ocp
@@ -22,7 +25,7 @@ concurrency:
jobs: jobs:
auto-approve-merge: auto-approve-merge:
if: github.actor == 'nextcloud-command' if: github.actor == 'nextcloud-command'
runs-on: ubuntu-latest runs-on: ubuntu-latest-low
permissions: permissions:
# for hmarr/auto-approve-action to approve PRs # for hmarr/auto-approve-action to approve PRs
pull-requests: write pull-requests: write
@@ -30,7 +33,13 @@ jobs:
contents: write contents: write
steps: steps:
- uses: mdecoleman/pr-branch-name@55795d86b4566d300d237883103f052125cc7508 # v3.0.0 - name: Disabled on forks
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
run: |
echo 'Can not approve PRs from forks'
exit 1
- uses: mdecoleman/pr-branch-name@bab4c71506bcd299fb350af63bb8e53f2940a599 # v2.0.0
id: branchname id: branchname
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
@@ -43,7 +52,7 @@ jobs:
# Enable GitHub auto merge # Enable GitHub auto merge
- name: Auto merge - name: Auto merge
uses: alexwilson/enable-github-automerge-action@984aa5760674115463cb7835dc156fcc17413419 # main uses: alexwilson/enable-github-automerge-action@56e3117d1ae1540309dc8f7a9f2825bc3c5f06ff # main
if: startsWith(steps.branchname.outputs.branch, 'automated/noid/') && endsWith(steps.branchname.outputs.branch, 'update-nextcloud-ocp') if: startsWith(steps.branchname.outputs.branch, 'automated/noid/') && endsWith(steps.branchname.outputs.branch, 'update-nextcloud-ocp')
with: with:
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -2,6 +2,9 @@
# #
# https://github.com/nextcloud/.github # https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
#
# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT
name: Update nextcloud/ocp name: Update nextcloud/ocp
@@ -31,7 +34,7 @@ jobs:
- name: Set up php8.2 - name: Set up php8.2
if: steps.checkout.outcome == 'success' if: steps.checkout.outcome == 'success'
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2 uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
with: with:
php-version: 8.2 php-version: 8.2
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -54,15 +57,15 @@ jobs:
- name: Composer update nextcloud/ocp - name: Composer update nextcloud/ocp
id: update_branch id: update_branch
if: ${{ steps.checkout.outcome == 'success' && matrix.branches != 'main' }} if: ${{ steps.checkout.outcome == 'success' && matrix.branches != 'main' }}
run: composer require --dev nextcloud/ocp:dev-${{ matrix.branches }} run: composer require --dev 'nextcloud/ocp:dev-${{ matrix.branches }}'
- name: Raise on issue on failure - name: Raise on issue on failure
uses: dacbd/create-issue-action@cdb57ab6ff8862aa09fee2be6ba77a59581921c2 # v2.0.0 uses: dacbd/create-issue-action@cdb57ab6ff8862aa09fee2be6ba77a59581921c2 # v2.0.0
if: ${{ steps.checkout.outcome == 'success' && failure() && steps.update_branch.conclusion == 'failure' }} if: ${{ steps.checkout.outcome == 'success' && failure() && steps.update_branch.conclusion == 'failure' }}
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
title: Failed to update nextcloud/ocp package on branch ${{ matrix.branches }} 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<br>${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}<br>${{ steps.codeowners.outputs.codeowners }} body: 'Please check the output of the GitHub action and manually resolve the issues<br>${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}<br>${{ steps.codeowners.outputs.codeowners }}'
- name: Composer update nextcloud/ocp - name: Composer update nextcloud/ocp
id: update_main id: update_main
@@ -74,8 +77,8 @@ jobs:
if: ${{ steps.checkout.outcome == 'success' && failure() && steps.update_main.conclusion == 'failure' }} if: ${{ steps.checkout.outcome == 'success' && failure() && steps.update_main.conclusion == 'failure' }}
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
title: Failed to update nextcloud/ocp package on branch ${{ matrix.branches }} 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<br>${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}<br>${{ steps.codeowners.outputs.codeowners }} body: 'Please check the output of the GitHub action and manually resolve the issues<br>${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}<br>${{ steps.codeowners.outputs.codeowners }}'
- name: Reset checkout 3rdparty - name: Reset checkout 3rdparty
if: steps.checkout.outcome == 'success' if: steps.checkout.outcome == 'success'
@@ -100,15 +103,15 @@ jobs:
- name: Create Pull Request - name: Create Pull Request
if: steps.checkout.outcome == 'success' if: steps.checkout.outcome == 'success'
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v3 uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
with: with:
token: ${{ secrets.COMMAND_BOT_PAT }} token: ${{ secrets.COMMAND_BOT_PAT }}
commit-message: "chore(dev-deps): Bump nextcloud/ocp package" commit-message: 'chore(dev-deps): Bump nextcloud/ocp package'
committer: GitHub <noreply@github.com> committer: GitHub <noreply@github.com>
author: nextcloud-command <nextcloud-command@users.noreply.github.com> author: nextcloud-command <nextcloud-command@users.noreply.github.com>
signoff: true signoff: true
branch: automated/noid/${{ matrix.branches }}-update-nextcloud-ocp branch: 'automated/noid/${{ matrix.branches }}-update-nextcloud-ocp'
title: "[${{ matrix.branches }}] Update nextcloud/ocp dependency" title: '[${{ matrix.branches }}] Update nextcloud/ocp dependency'
body: | body: |
Auto-generated update of [nextcloud/ocp](https://github.com/nextcloud-deps/ocp/) dependency Auto-generated update of [nextcloud/ocp](https://github.com/nextcloud-deps/ocp/) dependency
labels: | labels: |