From 15598629994061642e39d41671c8c5042458de4f Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Mon, 30 Nov 2026 18:56:25 +0100 Subject: [PATCH 1/2] ci: allow overriding runner labels via organization variables Mirrors of this repository (e.g. in the nextcloud-gmbh organization) must run on self-hosted runners and so far rewrite every `runs-on` line on sync. That rewrite collapses the low and assets runners onto the default one and the rewritten workflows already leaked back into this repository once. Read the runner labels from the RUNS_ON_UBUNTU_LATEST, RUNS_ON_UBUNTU_LATEST_LOW and RUNS_ON_UBUNTU_LATEST_ASSETS variables (JSON encoded label or label list) and fall back to the GitHub hosted runners when they are unset, so nothing changes for this organization. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Ferdinand Thiessen --- .github/workflows/ai-policy.yml | 2 +- .github/workflows/autocheckers.yml | 8 ++++---- .github/workflows/block-merge-eol.yml | 2 +- .github/workflows/block-merge-freeze.yml | 2 +- .github/workflows/block-outdated-3rdparty.yml | 2 +- .github/workflows/block-unconventional-commits.yml | 2 +- .github/workflows/bug-report-labeler.yml | 2 +- .github/workflows/codeql.yml | 2 +- .github/workflows/command-compile.yml | 4 ++-- .github/workflows/command-pull-3rdparty.yml | 2 +- .github/workflows/dependabot-approve-merge.yml | 2 +- .github/workflows/files-external.yml | 4 ++-- .github/workflows/fixup.yml | 2 +- .github/workflows/integration-dav.yml | 6 +++--- .github/workflows/integration-litmus.yml | 6 +++--- .github/workflows/integration-s3-primary.yml | 2 +- .github/workflows/integration-sqlite.yml | 6 +++--- .github/workflows/lint-eslint.yml | 6 +++--- .github/workflows/lint-php-cs.yml | 6 +++--- .github/workflows/lint-php.yml | 6 +++--- .github/workflows/lint-stylelint.yml | 6 +++--- .github/workflows/node-dist-unchanged.yml | 2 +- .github/workflows/node-test.yml | 6 +++--- .github/workflows/npm-audit-fix.yml | 2 +- .github/workflows/npm-build.yml | 6 +++--- .github/workflows/object-storage.yml | 2 +- .github/workflows/openapi.yml | 2 +- .github/workflows/performance.yml | 2 +- .github/workflows/phpunit-32bits.yml | 2 +- .github/workflows/phpunit-kvstore.yml | 2 +- .github/workflows/phpunit-mariadb.yml | 2 +- .github/workflows/phpunit-memcached.yml | 2 +- .github/workflows/phpunit-mysql-sharding.yml | 2 +- .github/workflows/phpunit-mysql.yml | 2 +- .github/workflows/phpunit-nodb.yml | 2 +- .github/workflows/phpunit-object-store-primary.yml | 2 +- .github/workflows/phpunit-oci.yml | 2 +- .github/workflows/phpunit-pgsql.yml | 2 +- .github/workflows/phpunit-sqlite.yml | 2 +- .github/workflows/phpunit.yml | 4 ++-- .github/workflows/playwright.yml | 10 +++++----- .github/workflows/pr-feedback.yml | 2 +- .github/workflows/rector-apply.yml | 2 +- .github/workflows/rector.yml | 6 +++--- .github/workflows/reuse.yml | 2 +- .github/workflows/stale.yml | 3 +-- .github/workflows/static-code-analysis.yml | 14 +++++++------- .github/workflows/storage.yml | 4 ++-- .github/workflows/update-min-supported-desktop.yml | 2 +- .github/workflows/update-node-dist.yml | 2 +- .github/workflows/update-stable-titles.yml | 2 +- 51 files changed, 88 insertions(+), 89 deletions(-) diff --git a/.github/workflows/ai-policy.yml b/.github/workflows/ai-policy.yml index 9b6d49435f142..54e267121e90f 100644 --- a/.github/workflows/ai-policy.yml +++ b/.github/workflows/ai-policy.yml @@ -27,7 +27,7 @@ concurrency: jobs: check-ai-trailers: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} steps: - name: Collect PR commit messages id: collect diff --git a/.github/workflows/autocheckers.yml b/.github/workflows/autocheckers.yml index 1fccea944bc1d..1f8f981d09772 100644 --- a/.github/workflows/autocheckers.yml +++ b/.github/workflows/autocheckers.yml @@ -14,7 +14,7 @@ concurrency: jobs: changes: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} outputs: src: ${{ steps.changes.outputs.src }} @@ -39,7 +39,7 @@ jobs: - build/autoloaderchecker.sh autoloader: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} needs: changes if: needs.changes.outputs.src != 'false' @@ -68,7 +68,7 @@ jobs: run: bash ./build/autoloaderchecker.sh autocheckers: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} needs: changes if: needs.changes.outputs.src != 'false' @@ -111,7 +111,7 @@ jobs: summary: permissions: contents: none - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} needs: [changes, autoloader, autocheckers] if: always() diff --git a/.github/workflows/block-merge-eol.yml b/.github/workflows/block-merge-eol.yml index ab04945680864..31f870b54c907 100644 --- a/.github/workflows/block-merge-eol.yml +++ b/.github/workflows/block-merge-eol.yml @@ -23,7 +23,7 @@ jobs: # Only run on stableXX branches if: startsWith( github.base_ref, 'stable') - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} steps: - name: Set server major version environment diff --git a/.github/workflows/block-merge-freeze.yml b/.github/workflows/block-merge-freeze.yml index e6652565b3c83..4536579f34f60 100644 --- a/.github/workflows/block-merge-freeze.yml +++ b/.github/workflows/block-merge-freeze.yml @@ -25,7 +25,7 @@ jobs: if: github.event.pull_request.draft == false - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} steps: - name: Register server reference to fallback to master branch diff --git a/.github/workflows/block-outdated-3rdparty.yml b/.github/workflows/block-outdated-3rdparty.yml index 2e0dd156c2c81..572df27a17760 100644 --- a/.github/workflows/block-outdated-3rdparty.yml +++ b/.github/workflows/block-outdated-3rdparty.yml @@ -17,7 +17,7 @@ jobs: block-outdated-3rdparty: name: Block merging with outdated 3rdparty/ - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} steps: - name: Check requirement diff --git a/.github/workflows/block-unconventional-commits.yml b/.github/workflows/block-unconventional-commits.yml index 4972f8bb33dbe..db17daa413522 100644 --- a/.github/workflows/block-unconventional-commits.yml +++ b/.github/workflows/block-unconventional-commits.yml @@ -23,7 +23,7 @@ jobs: block-unconventional-commits: name: Block unconventional commits - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} steps: - name: Checkout diff --git a/.github/workflows/bug-report-labeler.yml b/.github/workflows/bug-report-labeler.yml index 369f95b7947fa..986817c88307a 100644 --- a/.github/workflows/bug-report-labeler.yml +++ b/.github/workflows/bug-report-labeler.yml @@ -9,7 +9,7 @@ on: jobs: add-version-label: if: contains(github.event.issue.title, '[Bug]') - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} permissions: issues: write steps: diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index afea0f6149196..b680eb605f107 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -14,7 +14,7 @@ on: jobs: analyze: name: Analyze (${{ matrix.language }}) - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} permissions: # required for all workflows security-events: write diff --git a/.github/workflows/command-compile.yml b/.github/workflows/command-compile.yml index 8f5d5407f8da4..5de94e661485e 100644 --- a/.github/workflows/command-compile.yml +++ b/.github/workflows/command-compile.yml @@ -16,7 +16,7 @@ permissions: jobs: init: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} # On pull requests and if the comment starts with `/compile` if: github.event.issue.pull_request != '' && startsWith(github.event.comment.body, '/compile') @@ -92,7 +92,7 @@ jobs: reactions: '-1' process: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} needs: init steps: diff --git a/.github/workflows/command-pull-3rdparty.yml b/.github/workflows/command-pull-3rdparty.yml index e608747805f0f..08101f1942fe9 100644 --- a/.github/workflows/command-pull-3rdparty.yml +++ b/.github/workflows/command-pull-3rdparty.yml @@ -11,7 +11,7 @@ permissions: jobs: rebase: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} permissions: contents: none pull-requests: read diff --git a/.github/workflows/dependabot-approve-merge.yml b/.github/workflows/dependabot-approve-merge.yml index 76340acb5279a..2810d0fdf1bb1 100644 --- a/.github/workflows/dependabot-approve-merge.yml +++ b/.github/workflows/dependabot-approve-merge.yml @@ -25,7 +25,7 @@ concurrency: jobs: auto-approve-merge: if: github.event.pull_request.user.login == 'dependabot[bot]' - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} env: # env variable for maintainers: 'true' allows to auto-merge 1.0.2 -> 2.0.0 ALLOW_MAJOR: false diff --git a/.github/workflows/files-external.yml b/.github/workflows/files-external.yml index 7cd2527f8bf43..63d42a6d21827 100644 --- a/.github/workflows/files-external.yml +++ b/.github/workflows/files-external.yml @@ -9,7 +9,7 @@ permissions: jobs: files-external: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} if: ${{ github.repository_owner != 'nextcloud-gmbh' }} @@ -178,7 +178,7 @@ jobs: docker ps -aq | while read container ; do IMAGE=$(docker inspect --format='{{.Config.Image}}' $container); echo $IMAGE; docker logs $container; echo "\n\n" ; done files-external-smb-kerberos: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} if: ${{ github.repository_owner != 'nextcloud-gmbh' }} diff --git a/.github/workflows/fixup.yml b/.github/workflows/fixup.yml index 69da2bbb039f2..c9c062b992de3 100644 --- a/.github/workflows/fixup.yml +++ b/.github/workflows/fixup.yml @@ -27,7 +27,7 @@ jobs: pull-requests: write name: Block fixup and squash commits - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} steps: - name: Run check diff --git a/.github/workflows/integration-dav.yml b/.github/workflows/integration-dav.yml index 7187602367d70..36b6e9fe5f154 100644 --- a/.github/workflows/integration-dav.yml +++ b/.github/workflows/integration-dav.yml @@ -13,7 +13,7 @@ concurrency: jobs: changes: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} outputs: src: ${{ steps.changes.outputs.src}} @@ -37,7 +37,7 @@ jobs: - 'composer.lock' integration-caldav: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} needs: changes if: needs.changes.outputs.src != 'false' && github.repository_owner != 'nextcloud-gmbh' @@ -118,7 +118,7 @@ jobs: caldav-integration-summary: permissions: contents: none - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} needs: [changes, integration-caldav] if: always() diff --git a/.github/workflows/integration-litmus.yml b/.github/workflows/integration-litmus.yml index 23f43b314e82c..74be98fc5e0f0 100644 --- a/.github/workflows/integration-litmus.yml +++ b/.github/workflows/integration-litmus.yml @@ -13,7 +13,7 @@ concurrency: jobs: changes: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} outputs: src: ${{ steps.changes.outputs.src}} @@ -37,7 +37,7 @@ jobs: - 'composer.lock' integration-litmus: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} needs: changes if: needs.changes.outputs.src != 'false' && github.repository_owner != 'nextcloud-gmbh' @@ -106,7 +106,7 @@ jobs: integration-litmus-summary: permissions: contents: none - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} needs: [changes, integration-litmus] if: always() diff --git a/.github/workflows/integration-s3-primary.yml b/.github/workflows/integration-s3-primary.yml index be896bbe25b25..5f3999d13489b 100644 --- a/.github/workflows/integration-s3-primary.yml +++ b/.github/workflows/integration-s3-primary.yml @@ -9,7 +9,7 @@ permissions: jobs: integration-s3-primary: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} if: github.repository_owner != 'nextcloud-gmbh' diff --git a/.github/workflows/integration-sqlite.yml b/.github/workflows/integration-sqlite.yml index 60d1a81f6eba3..45cfec32e66f9 100644 --- a/.github/workflows/integration-sqlite.yml +++ b/.github/workflows/integration-sqlite.yml @@ -14,7 +14,7 @@ concurrency: jobs: changes: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} outputs: src: ${{ steps.changes.outputs.src}} @@ -39,7 +39,7 @@ jobs: - 'core/shipped.json' integration-sqlite: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} needs: changes if: needs.changes.outputs.src != 'false' @@ -179,7 +179,7 @@ jobs: summary: permissions: contents: none - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} needs: [changes, integration-sqlite] if: always() diff --git a/.github/workflows/lint-eslint.yml b/.github/workflows/lint-eslint.yml index 6cfbc5a355337..499b167b9f18c 100644 --- a/.github/workflows/lint-eslint.yml +++ b/.github/workflows/lint-eslint.yml @@ -19,7 +19,7 @@ concurrency: jobs: changes: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} permissions: contents: read pull-requests: read @@ -47,7 +47,7 @@ jobs: - '**.vue' lint: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} needs: changes if: needs.changes.outputs.src != 'false' @@ -87,7 +87,7 @@ jobs: summary: permissions: contents: none - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} needs: [changes, lint] if: always() diff --git a/.github/workflows/lint-php-cs.yml b/.github/workflows/lint-php-cs.yml index 9bc7c92ca7b83..cf7310de747e0 100644 --- a/.github/workflows/lint-php-cs.yml +++ b/.github/workflows/lint-php-cs.yml @@ -19,7 +19,7 @@ concurrency: jobs: changes: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} outputs: src: ${{ steps.changes.outputs.src}} @@ -42,7 +42,7 @@ jobs: - '**.php' lint: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} needs: changes if: needs.changes.outputs.src != 'false' @@ -75,7 +75,7 @@ jobs: summary: permissions: contents: none - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} needs: [changes, lint] if: always() diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml index f406f3185440d..99f972ee992d0 100644 --- a/.github/workflows/lint-php.yml +++ b/.github/workflows/lint-php.yml @@ -19,7 +19,7 @@ concurrency: jobs: changes: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} outputs: src: ${{ steps.changes.outputs.src}} steps: @@ -40,7 +40,7 @@ jobs: - '**.php' lint: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} needs: changes if: needs.changes.outputs.src != 'false' @@ -74,7 +74,7 @@ jobs: summary: permissions: contents: none - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} needs: [changes, lint] if: always() diff --git a/.github/workflows/lint-stylelint.yml b/.github/workflows/lint-stylelint.yml index 2590b6778c688..f441f74b7da36 100644 --- a/.github/workflows/lint-stylelint.yml +++ b/.github/workflows/lint-stylelint.yml @@ -19,7 +19,7 @@ concurrency: jobs: changes: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} permissions: contents: read pull-requests: read @@ -44,7 +44,7 @@ jobs: - '**.vue' lint: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} needs: changes if: needs.changes.outputs.src != 'false' @@ -83,7 +83,7 @@ jobs: summary: permissions: contents: none - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} needs: [changes, lint] if: always() diff --git a/.github/workflows/node-dist-unchanged.yml b/.github/workflows/node-dist-unchanged.yml index 3976ada89e25b..6f54d241182fe 100644 --- a/.github/workflows/node-dist-unchanged.yml +++ b/.github/workflows/node-dist-unchanged.yml @@ -9,7 +9,7 @@ on: jobs: changed_files: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} name: Check node dist files permissions: pull-requests: read diff --git a/.github/workflows/node-test.yml b/.github/workflows/node-test.yml index 90ade8b74b313..87ecd2edd07d4 100644 --- a/.github/workflows/node-test.yml +++ b/.github/workflows/node-test.yml @@ -22,7 +22,7 @@ concurrency: jobs: changes: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} permissions: contents: read pull-requests: read @@ -51,7 +51,7 @@ jobs: - '**.vue' test: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} needs: changes if: needs.changes.outputs.src != 'false' @@ -94,7 +94,7 @@ jobs: summary: permissions: contents: none - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} needs: [changes, test] if: always() diff --git a/.github/workflows/npm-audit-fix.yml b/.github/workflows/npm-audit-fix.yml index ef5771bddc4dc..d53fade66d978 100644 --- a/.github/workflows/npm-audit-fix.yml +++ b/.github/workflows/npm-audit-fix.yml @@ -20,7 +20,7 @@ permissions: jobs: build: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} env: # env variable for maintainers: 'false' disables auto-merge for these pull requests diff --git a/.github/workflows/npm-build.yml b/.github/workflows/npm-build.yml index 39eb05e73d4a1..85bafa85dad81 100644 --- a/.github/workflows/npm-build.yml +++ b/.github/workflows/npm-build.yml @@ -19,7 +19,7 @@ concurrency: jobs: changes: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} permissions: contents: read pull-requests: read @@ -45,7 +45,7 @@ jobs: - '**.vue' build: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} needs: changes if: needs.changes.outputs.src != 'false' @@ -101,7 +101,7 @@ jobs: summary: permissions: contents: none - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} needs: [changes, build] if: always() diff --git a/.github/workflows/object-storage.yml b/.github/workflows/object-storage.yml index fd4d510155ceb..bc91282a27fbc 100644 --- a/.github/workflows/object-storage.yml +++ b/.github/workflows/object-storage.yml @@ -13,7 +13,7 @@ concurrency: jobs: object-storage: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} if: ${{ github.repository_owner != 'nextcloud-gmbh' }} diff --git a/.github/workflows/openapi.yml b/.github/workflows/openapi.yml index def87e2543065..5cfe3d6a12143 100644 --- a/.github/workflows/openapi.yml +++ b/.github/workflows/openapi.yml @@ -20,7 +20,7 @@ concurrency: jobs: openapi: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} if: ${{ github.repository_owner != 'nextcloud-gmbh' }} diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index 856195d01cc15..36d084a1884ad 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -13,7 +13,7 @@ concurrency: jobs: performance-testing: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} # Skip entirely on fork PRs so the job result is 'skipped' rather than # 'failure'. The profiler action uses github.event.pull_request.head.repo.clone_url diff --git a/.github/workflows/phpunit-32bits.yml b/.github/workflows/phpunit-32bits.yml index b0ec1ae62d564..135fa21190e73 100644 --- a/.github/workflows/phpunit-32bits.yml +++ b/.github/workflows/phpunit-32bits.yml @@ -25,7 +25,7 @@ concurrency: jobs: phpunit-32bits: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} if: ${{ github.repository_owner != 'nextcloud-gmbh' }} diff --git a/.github/workflows/phpunit-kvstore.yml b/.github/workflows/phpunit-kvstore.yml index b41780c79ae14..56ca5e16e858f 100644 --- a/.github/workflows/phpunit-kvstore.yml +++ b/.github/workflows/phpunit-kvstore.yml @@ -14,7 +14,7 @@ env: jobs: phpunit-kvstore: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} strategy: fail-fast: false diff --git a/.github/workflows/phpunit-mariadb.yml b/.github/workflows/phpunit-mariadb.yml index 506d620c1b770..b03f2421f8b80 100644 --- a/.github/workflows/phpunit-mariadb.yml +++ b/.github/workflows/phpunit-mariadb.yml @@ -16,7 +16,7 @@ permissions: jobs: phpunit-mariadb: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} strategy: fail-fast: false diff --git a/.github/workflows/phpunit-memcached.yml b/.github/workflows/phpunit-memcached.yml index 96dc657e6cb41..ddcc343c3a99c 100644 --- a/.github/workflows/phpunit-memcached.yml +++ b/.github/workflows/phpunit-memcached.yml @@ -16,7 +16,7 @@ permissions: jobs: phpunit-memcached: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} strategy: fail-fast: false diff --git a/.github/workflows/phpunit-mysql-sharding.yml b/.github/workflows/phpunit-mysql-sharding.yml index 191f3969b4c6b..dd3500ac126d2 100644 --- a/.github/workflows/phpunit-mysql-sharding.yml +++ b/.github/workflows/phpunit-mysql-sharding.yml @@ -16,7 +16,7 @@ permissions: jobs: phpunit-mysql: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} strategy: fail-fast: false diff --git a/.github/workflows/phpunit-mysql.yml b/.github/workflows/phpunit-mysql.yml index b70971711b670..2e4060ae3bd9e 100644 --- a/.github/workflows/phpunit-mysql.yml +++ b/.github/workflows/phpunit-mysql.yml @@ -16,7 +16,7 @@ permissions: jobs: phpunit-mysql: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} strategy: fail-fast: false diff --git a/.github/workflows/phpunit-nodb.yml b/.github/workflows/phpunit-nodb.yml index 488bdb5de339e..4257c20fef218 100644 --- a/.github/workflows/phpunit-nodb.yml +++ b/.github/workflows/phpunit-nodb.yml @@ -18,7 +18,7 @@ permissions: jobs: phpunit-nodb: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} strategy: fail-fast: false diff --git a/.github/workflows/phpunit-object-store-primary.yml b/.github/workflows/phpunit-object-store-primary.yml index f72baa62f007f..1482577697b12 100644 --- a/.github/workflows/phpunit-object-store-primary.yml +++ b/.github/workflows/phpunit-object-store-primary.yml @@ -9,7 +9,7 @@ permissions: jobs: object-store-primary-tests-minio: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} if: ${{ github.repository_owner != 'nextcloud-gmbh' }} diff --git a/.github/workflows/phpunit-oci.yml b/.github/workflows/phpunit-oci.yml index b5850ad803cd4..304584a376d98 100644 --- a/.github/workflows/phpunit-oci.yml +++ b/.github/workflows/phpunit-oci.yml @@ -16,7 +16,7 @@ permissions: jobs: phpunit-oci: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} if: ${{ github.repository_owner != 'nextcloud-gmbh' }} diff --git a/.github/workflows/phpunit-pgsql.yml b/.github/workflows/phpunit-pgsql.yml index 864f197f6ec7b..80323c1d69de8 100644 --- a/.github/workflows/phpunit-pgsql.yml +++ b/.github/workflows/phpunit-pgsql.yml @@ -16,7 +16,7 @@ permissions: jobs: phpunit-pgsql: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} strategy: fail-fast: false diff --git a/.github/workflows/phpunit-sqlite.yml b/.github/workflows/phpunit-sqlite.yml index fa658ee13540a..b906463e05c23 100644 --- a/.github/workflows/phpunit-sqlite.yml +++ b/.github/workflows/phpunit-sqlite.yml @@ -16,7 +16,7 @@ permissions: jobs: phpunit-sqlite: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} strategy: fail-fast: false diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index 60d8b05977fa3..953fdee16ea83 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -18,7 +18,7 @@ concurrency: # GitHub allows a maximum of 20 reusable workflows per caller jobs: changes: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} permissions: contents: read pull-requests: read @@ -108,7 +108,7 @@ jobs: summary: permissions: contents: none - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} needs: [changes, mariadb, memcached, mysql, mysql-sharding, object-store-primary, oci, pgsql, sqlite, nodb, kvstore] if: always() diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index a2c7899dbd0b8..99f188e3ca19f 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -20,7 +20,7 @@ jobs: playwright-setup: timeout-minutes: 15 name: Playwright setup - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: @@ -49,7 +49,7 @@ jobs: needs: [playwright-setup] timeout-minutes: 60 name: Playwright tests ${{ matrix.shardIndex }} / ${{ matrix.shardTotal }} - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} strategy: fail-fast: false matrix: @@ -119,7 +119,7 @@ jobs: needs: [playwright-setup] timeout-minutes: 30 name: Playwright tests for installer - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} # The installation-wizard tests exercise every supported database backend, so # they need reachable database service containers. The Nextcloud container is @@ -229,7 +229,7 @@ jobs: if: ${{ !cancelled() }} needs: [playwright-tests, playwright-installer-tests] - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} steps: - name: Restore context id: cache @@ -282,7 +282,7 @@ jobs: summary: permissions: contents: none - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} needs: [playwright-tests, playwright-installer-tests] if: always() diff --git a/.github/workflows/pr-feedback.yml b/.github/workflows/pr-feedback.yml index e93d2be9b01db..5a69f15c1c494 100644 --- a/.github/workflows/pr-feedback.yml +++ b/.github/workflows/pr-feedback.yml @@ -22,7 +22,7 @@ permissions: jobs: pr-feedback: if: ${{ github.repository_owner == 'nextcloud' }} - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} steps: - name: The get-github-handles-from-website action uses: marcelklehr/get-github-handles-from-website-action@06b2239db0a48fe1484ba0bfd966a3ab81a08308 # v1.0.1 diff --git a/.github/workflows/rector-apply.yml b/.github/workflows/rector-apply.yml index ddc2af4e05bb7..419ca7e774692 100644 --- a/.github/workflows/rector-apply.yml +++ b/.github/workflows/rector-apply.yml @@ -19,7 +19,7 @@ permissions: jobs: build: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} name: rector-apply diff --git a/.github/workflows/rector.yml b/.github/workflows/rector.yml index 0e5c3c6cbd742..c0563208fc32d 100644 --- a/.github/workflows/rector.yml +++ b/.github/workflows/rector.yml @@ -14,7 +14,7 @@ concurrency: jobs: changes: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} outputs: src: ${{ steps.changes.outputs.src}} @@ -37,7 +37,7 @@ jobs: - '**.php' strict: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} needs: changes if: ${{ needs.changes.outputs.src != 'false' && github.event_name != 'push' && github.repository_owner != 'nextcloud-gmbh' }} @@ -71,7 +71,7 @@ jobs: summary: permissions: contents: none - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} needs: [changes, strict] if: always() diff --git a/.github/workflows/reuse.yml b/.github/workflows/reuse.yml index 67fdafc440e24..b3248a5f6e6f8 100644 --- a/.github/workflows/reuse.yml +++ b/.github/workflows/reuse.yml @@ -16,7 +16,7 @@ permissions: jobs: reuse-compliance-check: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} steps: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index bd4a6707ccc9b..0026aa59e8391 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -12,7 +12,7 @@ permissions: jobs: stale: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} if: ${{ github.repository_owner != 'nextcloud-gmbh' }} @@ -34,4 +34,3 @@ jobs: days-before-stale: 30 days-before-close: 14 # debug-only: true - diff --git a/.github/workflows/static-code-analysis.yml b/.github/workflows/static-code-analysis.yml index 9316048ce6558..6deccee89bc4b 100644 --- a/.github/workflows/static-code-analysis.yml +++ b/.github/workflows/static-code-analysis.yml @@ -22,7 +22,7 @@ concurrency: jobs: changes: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} outputs: src: ${{ steps.changes.outputs.src }} @@ -48,7 +48,7 @@ jobs: - '**.php' static-code-analysis: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} needs: changes if: ${{ needs.changes.outputs.src != 'false' && github.event_name != 'push' && github.repository_owner != 'nextcloud-gmbh' }} @@ -81,7 +81,7 @@ jobs: run: git diff --exit-code -- . ':!lib/composer' static-code-analysis-security: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} needs: changes if: ${{ needs.changes.outputs.src != 'false' && github.repository_owner != 'nextcloud-gmbh' }} @@ -129,7 +129,7 @@ jobs: sarif_file: results.sarif static-code-analysis-ocp: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} needs: changes if: ${{ needs.changes.outputs.src != 'false' && github.event_name != 'push' && github.repository_owner != 'nextcloud-gmbh' }} @@ -162,7 +162,7 @@ jobs: run: git diff --exit-code -- . ':!lib/composer' static-code-analysis-ncu: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} needs: changes if: ${{ needs.changes.outputs.src != 'false' && github.event_name != 'push' && github.repository_owner != 'nextcloud-gmbh' }} @@ -191,7 +191,7 @@ jobs: run: composer run psalm:ncu -- --threads=1 --monochrome --no-progress --output-format=github static-code-analysis-strict: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} needs: changes if: ${{ needs.changes.outputs.src != 'false' && github.event_name != 'push' && github.repository_owner != 'nextcloud-gmbh' }} @@ -221,7 +221,7 @@ jobs: summary: permissions: contents: none - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} needs: [changes, static-code-analysis, static-code-analysis-security, static-code-analysis-ocp, static-code-analysis-ncu, static-code-analysis-strict] if: always() diff --git a/.github/workflows/storage.yml b/.github/workflows/storage.yml index 4637cd4bfff69..dca2d6064a507 100644 --- a/.github/workflows/storage.yml +++ b/.github/workflows/storage.yml @@ -18,7 +18,7 @@ concurrency: # GitHub allows a maximum of 20 reusable workflows per caller jobs: changes: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} permissions: contents: read pull-requests: read @@ -84,7 +84,7 @@ jobs: summary: permissions: contents: none - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} needs: [changes, files-external, object-storage, integration-s3-primary] if: always() diff --git a/.github/workflows/update-min-supported-desktop.yml b/.github/workflows/update-min-supported-desktop.yml index 9c6648d7dc04b..4a56427e662c3 100644 --- a/.github/workflows/update-min-supported-desktop.yml +++ b/.github/workflows/update-min-supported-desktop.yml @@ -13,7 +13,7 @@ permissions: jobs: update-minimum-supported-desktop-version: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 diff --git a/.github/workflows/update-node-dist.yml b/.github/workflows/update-node-dist.yml index 5df9dada085b5..03b19eefa31de 100644 --- a/.github/workflows/update-node-dist.yml +++ b/.github/workflows/update-node-dist.yml @@ -19,7 +19,7 @@ concurrency: jobs: update-node-dist: - runs-on: ubuntu-latest-assets + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_ASSETS || '"ubuntu-latest-assets"') }} environment: update-node-dist steps: diff --git a/.github/workflows/update-stable-titles.yml b/.github/workflows/update-stable-titles.yml index ca8be8bff6c98..492f8285dae47 100644 --- a/.github/workflows/update-stable-titles.yml +++ b/.github/workflows/update-stable-titles.yml @@ -14,7 +14,7 @@ concurrency: jobs: update-pr-title: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} permissions: pull-requests: write contents: read From ceddbb03f4c56983fde444b3a0faa69bddd56e9b Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Tue, 1 Dec 2026 11:45:30 +0100 Subject: [PATCH 2/2] ci: set required permissions on workflows Signed-off-by: Ferdinand Thiessen --- .github/workflows/codeql.yml | 3 ++- .github/workflows/integration-dav.yml | 3 +++ .github/workflows/integration-litmus.yml | 3 +++ .github/workflows/rector.yml | 3 +++ .github/workflows/static-code-analysis.yml | 4 ++++ 5 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index b680eb605f107..9853d82400738 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -16,9 +16,10 @@ jobs: name: Analyze (${{ matrix.language }}) runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} permissions: + # required to fetch on gmbh + contents: read # required for all workflows security-events: write - # required to fetch internal or private CodeQL packs packages: read diff --git a/.github/workflows/integration-dav.yml b/.github/workflows/integration-dav.yml index 36b6e9fe5f154..3e8a8d528e425 100644 --- a/.github/workflows/integration-dav.yml +++ b/.github/workflows/integration-dav.yml @@ -14,6 +14,9 @@ concurrency: jobs: changes: runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} + permissions: + contents: read + pull-requests: read outputs: src: ${{ steps.changes.outputs.src}} diff --git a/.github/workflows/integration-litmus.yml b/.github/workflows/integration-litmus.yml index 74be98fc5e0f0..26b42004e359e 100644 --- a/.github/workflows/integration-litmus.yml +++ b/.github/workflows/integration-litmus.yml @@ -14,6 +14,9 @@ concurrency: jobs: changes: runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} + permissions: + contents: read + pull-requests: read outputs: src: ${{ steps.changes.outputs.src}} diff --git a/.github/workflows/rector.yml b/.github/workflows/rector.yml index c0563208fc32d..9977b38bf2450 100644 --- a/.github/workflows/rector.yml +++ b/.github/workflows/rector.yml @@ -15,6 +15,9 @@ concurrency: jobs: changes: runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} + permissions: + contents: read + pull-requests: read outputs: src: ${{ steps.changes.outputs.src}} diff --git a/.github/workflows/static-code-analysis.yml b/.github/workflows/static-code-analysis.yml index 6deccee89bc4b..eb214be3addfe 100644 --- a/.github/workflows/static-code-analysis.yml +++ b/.github/workflows/static-code-analysis.yml @@ -24,6 +24,10 @@ jobs: changes: runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} + permissions: + contents: read + pull-requests: read + outputs: src: ${{ steps.changes.outputs.src }}