From a55c442c0e918bc4b0b3aeda5f79ae9500bc0af0 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Mon, 30 Nov 2026 19:03:55 +0100 Subject: [PATCH] ci: allow overriding runner labels via organization variables Organizations mirroring Nextcloud repositories (e.g. nextcloud-gmbh) must run on self-hosted runners and currently rewrite every runs-on line when syncing, which also drops the distinction between the default and the low runners. Read the runner labels from the RUNS_ON_UBUNTU_LATEST and RUNS_ON_UBUNTU_LATEST_LOW 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 --- workflow-templates/ai-policy.yml | 2 +- workflow-templates/appstore-build-publish.yml | 2 +- workflow-templates/block-merge-eol.yml | 2 +- workflow-templates/block-merge-freeze.yml | 2 +- workflow-templates/block-unconventional-commits.yml | 2 +- workflow-templates/command-compile.yml | 4 ++-- workflow-templates/command-openapi.yml | 4 ++-- workflow-templates/cypress.yml | 6 +++--- workflow-templates/dependabot-approve-merge.yml | 2 +- workflow-templates/documentation.yml | 2 +- workflow-templates/fixup.yml | 2 +- workflow-templates/lint-eslint.yml | 6 +++--- workflow-templates/lint-info-xml.yml | 2 +- workflow-templates/lint-php-cs.yml | 2 +- workflow-templates/lint-php.yml | 6 +++--- workflow-templates/lint-stylelint.yml | 2 +- workflow-templates/lint-typescript.yml | 6 +++--- workflow-templates/node-test.yml | 6 +++--- workflow-templates/node.yml | 2 +- workflow-templates/npm-audit-fix.yml | 2 +- workflow-templates/npm-build.yml | 6 +++--- workflow-templates/openapi.yml | 2 +- workflow-templates/phpstan.yml | 2 +- workflow-templates/phpunit-mariadb.yml | 6 +++--- workflow-templates/phpunit-mysql.yml | 6 +++--- workflow-templates/phpunit-oci.yml | 6 +++--- workflow-templates/phpunit-pgsql.yml | 6 +++--- workflow-templates/phpunit-sqlite.yml | 6 +++--- workflow-templates/playwright.yml | 8 ++++---- workflow-templates/pr-feedback.yml | 2 +- workflow-templates/psalm-matrix.yml | 6 +++--- workflow-templates/psalm.yml | 2 +- workflow-templates/rector-apply.yml | 2 +- workflow-templates/release-relay.yml | 2 +- workflow-templates/renovate-approve-merge.yml | 2 +- workflow-templates/reuse.yml | 2 +- workflow-templates/sync-workflow-templates.yml | 2 +- workflow-templates/update-nextcloud-ocp-approve-merge.yml | 2 +- workflow-templates/update-nextcloud-ocp-matrix.yml | 2 +- workflow-templates/update-nextcloud-ocp.yml | 2 +- workflow-templates/update-stable-titles.yml | 2 +- 41 files changed, 70 insertions(+), 70 deletions(-) diff --git a/workflow-templates/ai-policy.yml b/workflow-templates/ai-policy.yml index 5e7e42cc..d816128a 100644 --- a/workflow-templates/ai-policy.yml +++ b/workflow-templates/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/workflow-templates/appstore-build-publish.yml b/workflow-templates/appstore-build-publish.yml index 3108e0f2..3e04a26e 100644 --- a/workflow-templates/appstore-build-publish.yml +++ b/workflow-templates/appstore-build-publish.yml @@ -17,7 +17,7 @@ permissions: jobs: build_and_publish: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} # Only allowed to be run on nextcloud-releases repositories if: ${{ github.repository_owner == 'nextcloud-releases' }} diff --git a/workflow-templates/block-merge-eol.yml b/workflow-templates/block-merge-eol.yml index ab049456..31f870b5 100644 --- a/workflow-templates/block-merge-eol.yml +++ b/workflow-templates/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/workflow-templates/block-merge-freeze.yml b/workflow-templates/block-merge-freeze.yml index e6652565..4536579f 100644 --- a/workflow-templates/block-merge-freeze.yml +++ b/workflow-templates/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/workflow-templates/block-unconventional-commits.yml b/workflow-templates/block-unconventional-commits.yml index 4972f8bb..db17daa4 100644 --- a/workflow-templates/block-unconventional-commits.yml +++ b/workflow-templates/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/workflow-templates/command-compile.yml b/workflow-templates/command-compile.yml index 6ff8ec8c..09bca4a0 100644 --- a/workflow-templates/command-compile.yml +++ b/workflow-templates/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/workflow-templates/command-openapi.yml b/workflow-templates/command-openapi.yml index 5a4dc89a..4498c0b9 100644 --- a/workflow-templates/command-openapi.yml +++ b/workflow-templates/command-openapi.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 `/openapi` if: github.event.issue.pull_request != '' && startsWith(github.event.comment.body, '/openapi') @@ -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/workflow-templates/cypress.yml b/workflow-templates/cypress.yml index 820c3815..52d11362 100644 --- a/workflow-templates/cypress.yml +++ b/workflow-templates/cypress.yml @@ -30,7 +30,7 @@ permissions: jobs: init: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} outputs: nodeVersion: ${{ steps.versions.outputs.node-version }} npmVersion: ${{ steps.versions.outputs.package-manager-version }} @@ -86,7 +86,7 @@ jobs: path: ./ cypress: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} needs: init strategy: @@ -156,7 +156,7 @@ jobs: path: nextcloud.log summary: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} needs: [init, cypress] if: always() diff --git a/workflow-templates/dependabot-approve-merge.yml b/workflow-templates/dependabot-approve-merge.yml index 76340acb..2810d0fd 100644 --- a/workflow-templates/dependabot-approve-merge.yml +++ b/workflow-templates/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/workflow-templates/documentation.yml b/workflow-templates/documentation.yml index d701a699..97edafb7 100644 --- a/workflow-templates/documentation.yml +++ b/workflow-templates/documentation.yml @@ -18,7 +18,7 @@ permissions: jobs: build-and-deploy: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} name: Build and deploy steps: diff --git a/workflow-templates/fixup.yml b/workflow-templates/fixup.yml index 69da2bbb..c9c062b9 100644 --- a/workflow-templates/fixup.yml +++ b/workflow-templates/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/workflow-templates/lint-eslint.yml b/workflow-templates/lint-eslint.yml index 8021ce58..7642472f 100644 --- a/workflow-templates/lint-eslint.yml +++ b/workflow-templates/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' @@ -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, lint] if: always() diff --git a/workflow-templates/lint-info-xml.yml b/workflow-templates/lint-info-xml.yml index 8e6968c9..3ad7eacd 100644 --- a/workflow-templates/lint-info-xml.yml +++ b/workflow-templates/lint-info-xml.yml @@ -19,7 +19,7 @@ concurrency: jobs: xml-linters: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} name: info.xml lint steps: diff --git a/workflow-templates/lint-php-cs.yml b/workflow-templates/lint-php-cs.yml index b833e43e..f7f5d261 100644 --- a/workflow-templates/lint-php-cs.yml +++ b/workflow-templates/lint-php-cs.yml @@ -19,7 +19,7 @@ concurrency: jobs: lint: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} name: php-cs diff --git a/workflow-templates/lint-php.yml b/workflow-templates/lint-php.yml index 8248a8a4..59ac229c 100644 --- a/workflow-templates/lint-php.yml +++ b/workflow-templates/lint-php.yml @@ -19,7 +19,7 @@ concurrency: jobs: matrix: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} outputs: php-min: ${{ steps.versions.outputs.php-min }} php-max: ${{ steps.versions.outputs.php-max }} @@ -34,7 +34,7 @@ jobs: uses: nextcloud-libraries/nextcloud-version-matrix@d96fc6d3fd6cb9fc67f92d72aed808e802a5e65b # v1.3.6 php-lint: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} needs: matrix strategy: matrix: @@ -64,7 +64,7 @@ jobs: summary: permissions: contents: none - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} needs: php-lint if: always() diff --git a/workflow-templates/lint-stylelint.yml b/workflow-templates/lint-stylelint.yml index 39fb96e3..d7457f00 100644 --- a/workflow-templates/lint-stylelint.yml +++ b/workflow-templates/lint-stylelint.yml @@ -19,7 +19,7 @@ concurrency: jobs: lint: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} name: stylelint diff --git a/workflow-templates/lint-typescript.yml b/workflow-templates/lint-typescript.yml index 09fba338..f707b488 100644 --- a/workflow-templates/lint-typescript.yml +++ b/workflow-templates/lint-typescript.yml @@ -25,7 +25,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 @@ -48,7 +48,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' @@ -85,7 +85,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/workflow-templates/node-test.yml b/workflow-templates/node-test.yml index 4d9458a2..4bdf5a81 100644 --- a/workflow-templates/node-test.yml +++ b/workflow-templates/node-test.yml @@ -25,7 +25,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 @@ -53,7 +53,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' @@ -97,7 +97,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/workflow-templates/node.yml b/workflow-templates/node.yml index 9f672c2a..5fbeb6df 100644 --- a/workflow-templates/node.yml +++ b/workflow-templates/node.yml @@ -21,7 +21,7 @@ concurrency: jobs: summary: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} if: always() # This is the summary, we just avoid to rename it so that branch protection rules still match diff --git a/workflow-templates/npm-audit-fix.yml b/workflow-templates/npm-audit-fix.yml index 8338548d..3756b9e0 100644 --- a/workflow-templates/npm-audit-fix.yml +++ b/workflow-templates/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/workflow-templates/npm-build.yml b/workflow-templates/npm-build.yml index 66c2538b..57f36db7 100644 --- a/workflow-templates/npm-build.yml +++ b/workflow-templates/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' @@ -97,7 +97,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/workflow-templates/openapi.yml b/workflow-templates/openapi.yml index a2089ada..15b9e5fc 100644 --- a/workflow-templates/openapi.yml +++ b/workflow-templates/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/workflow-templates/phpstan.yml b/workflow-templates/phpstan.yml index b2c77e8e..5b793647 100644 --- a/workflow-templates/phpstan.yml +++ b/workflow-templates/phpstan.yml @@ -19,7 +19,7 @@ permissions: jobs: static-analysis: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} name: static-phpstan-analysis steps: diff --git a/workflow-templates/phpunit-mariadb.yml b/workflow-templates/phpunit-mariadb.yml index 2630133b..9384e0d1 100644 --- a/workflow-templates/phpunit-mariadb.yml +++ b/workflow-templates/phpunit-mariadb.yml @@ -19,7 +19,7 @@ concurrency: jobs: changes-and-matrix: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} permissions: contents: read pull-requests: read @@ -59,7 +59,7 @@ jobs: uses: nextcloud-libraries/nextcloud-version-matrix@d96fc6d3fd6cb9fc67f92d72aed808e802a5e65b # v1.3.6 phpunit-mariadb: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} needs: changes-and-matrix if: needs.changes-and-matrix.outputs.src != 'false' @@ -193,7 +193,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-and-matrix, phpunit-mariadb] if: always() diff --git a/workflow-templates/phpunit-mysql.yml b/workflow-templates/phpunit-mysql.yml index 75cf8cbd..99307e7a 100644 --- a/workflow-templates/phpunit-mysql.yml +++ b/workflow-templates/phpunit-mysql.yml @@ -19,7 +19,7 @@ concurrency: jobs: changes-and-matrix: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} permissions: contents: read pull-requests: read @@ -60,7 +60,7 @@ jobs: matrix: '{"mysql-versions": ["8.4"]}' phpunit-mysql: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} needs: changes-and-matrix if: needs.changes-and-matrix.outputs.src != 'false' @@ -191,7 +191,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-and-matrix, phpunit-mysql] if: always() diff --git a/workflow-templates/phpunit-oci.yml b/workflow-templates/phpunit-oci.yml index c2074839..c9e1b8ca 100644 --- a/workflow-templates/phpunit-oci.yml +++ b/workflow-templates/phpunit-oci.yml @@ -19,7 +19,7 @@ concurrency: jobs: changes-and-matrix: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} permissions: contents: read pull-requests: read @@ -59,7 +59,7 @@ jobs: uses: nextcloud-libraries/nextcloud-version-matrix@d96fc6d3fd6cb9fc67f92d72aed808e802a5e65b # v1.3.6 phpunit-oci: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} needs: changes-and-matrix if: needs.changes-and-matrix.outputs.src != 'false' @@ -198,7 +198,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-and-matrix, phpunit-oci] if: always() diff --git a/workflow-templates/phpunit-pgsql.yml b/workflow-templates/phpunit-pgsql.yml index ff59ae3f..31a07ecf 100644 --- a/workflow-templates/phpunit-pgsql.yml +++ b/workflow-templates/phpunit-pgsql.yml @@ -19,7 +19,7 @@ concurrency: jobs: changes-and-matrix: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} permissions: contents: read pull-requests: read @@ -59,7 +59,7 @@ jobs: uses: nextcloud-libraries/nextcloud-version-matrix@d96fc6d3fd6cb9fc67f92d72aed808e802a5e65b # v1.3.6 phpunit-pgsql: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} needs: changes-and-matrix if: needs.changes-and-matrix.outputs.src != 'false' @@ -189,7 +189,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-and-matrix, phpunit-pgsql] if: always() diff --git a/workflow-templates/phpunit-sqlite.yml b/workflow-templates/phpunit-sqlite.yml index b6a38932..b57e26ca 100644 --- a/workflow-templates/phpunit-sqlite.yml +++ b/workflow-templates/phpunit-sqlite.yml @@ -19,7 +19,7 @@ concurrency: jobs: changes-and-matrix: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} permissions: contents: read pull-requests: read @@ -59,7 +59,7 @@ jobs: uses: nextcloud-libraries/nextcloud-version-matrix@d96fc6d3fd6cb9fc67f92d72aed808e802a5e65b # v1.3.6 phpunit-sqlite: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} needs: changes-and-matrix if: needs.changes-and-matrix.outputs.src != 'false' @@ -178,7 +178,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-and-matrix, phpunit-sqlite] if: always() diff --git a/workflow-templates/playwright.yml b/workflow-templates/playwright.yml index c8240253..0bae1820 100644 --- a/workflow-templates/playwright.yml +++ b/workflow-templates/playwright.yml @@ -45,7 +45,7 @@ jobs: playwright-setup: timeout-minutes: 10 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: @@ -83,7 +83,7 @@ jobs: needs: [playwright-setup] timeout-minutes: 30 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: @@ -143,7 +143,7 @@ jobs: if: ${{ !cancelled() }} needs: [playwright-tests] - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} steps: - name: Restore context id: cache @@ -196,7 +196,7 @@ jobs: summary: permissions: contents: none - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} needs: [playwright-tests] if: always() diff --git a/workflow-templates/pr-feedback.yml b/workflow-templates/pr-feedback.yml index e93d2be9..5a69f15c 100644 --- a/workflow-templates/pr-feedback.yml +++ b/workflow-templates/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/workflow-templates/psalm-matrix.yml b/workflow-templates/psalm-matrix.yml index a22e904e..6ea5cf35 100644 --- a/workflow-templates/psalm-matrix.yml +++ b/workflow-templates/psalm-matrix.yml @@ -19,7 +19,7 @@ permissions: jobs: matrix: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} outputs: ocp-matrix: ${{ steps.versions.outputs.ocp-matrix }} php-min: ${{ steps.versions.outputs.php-min }} @@ -37,7 +37,7 @@ jobs: run: grep 'phpVersion="${{ steps.versions.outputs.php-min }}' psalm.xml static-analysis: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} needs: matrix strategy: # do not stop on another job's failure @@ -79,7 +79,7 @@ jobs: run: composer run psalm -- --threads=1 --monochrome --no-progress --output-format=github summary: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} needs: static-analysis if: always() diff --git a/workflow-templates/psalm.yml b/workflow-templates/psalm.yml index 678689dd..6cb939ab 100644 --- a/workflow-templates/psalm.yml +++ b/workflow-templates/psalm.yml @@ -19,7 +19,7 @@ permissions: jobs: static-analysis: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} name: static-psalm-analysis steps: diff --git a/workflow-templates/rector-apply.yml b/workflow-templates/rector-apply.yml index 1e9d635b..2a8deb1b 100644 --- a/workflow-templates/rector-apply.yml +++ b/workflow-templates/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/workflow-templates/release-relay.yml b/workflow-templates/release-relay.yml index 08908315..e4526c11 100644 --- a/workflow-templates/release-relay.yml +++ b/workflow-templates/release-relay.yml @@ -18,7 +18,7 @@ permissions: jobs: notify: name: Dispatch release to release-relay - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} # Only allowed to run on nextcloud-releases repositories if: ${{ github.repository_owner == 'nextcloud-releases' }} diff --git a/workflow-templates/renovate-approve-merge.yml b/workflow-templates/renovate-approve-merge.yml index 178888d0..365e05f1 100644 --- a/workflow-templates/renovate-approve-merge.yml +++ b/workflow-templates/renovate-approve-merge.yml @@ -25,7 +25,7 @@ concurrency: jobs: auto-approve-merge: if: github.event.pull_request.user.login == 'renovate[bot]' - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} permissions: # for auto-approve step to work pull-requests: write diff --git a/workflow-templates/reuse.yml b/workflow-templates/reuse.yml index 67fdafc4..b3248a5f 100644 --- a/workflow-templates/reuse.yml +++ b/workflow-templates/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/workflow-templates/sync-workflow-templates.yml b/workflow-templates/sync-workflow-templates.yml index 2af8ecb5..8db0469d 100644 --- a/workflow-templates/sync-workflow-templates.yml +++ b/workflow-templates/sync-workflow-templates.yml @@ -17,7 +17,7 @@ permissions: jobs: dispatch: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} strategy: fail-fast: false diff --git a/workflow-templates/update-nextcloud-ocp-approve-merge.yml b/workflow-templates/update-nextcloud-ocp-approve-merge.yml index 4d9f82a2..4ccc05a5 100644 --- a/workflow-templates/update-nextcloud-ocp-approve-merge.yml +++ b/workflow-templates/update-nextcloud-ocp-approve-merge.yml @@ -21,7 +21,7 @@ concurrency: jobs: auto-approve-merge: - runs-on: ubuntu-latest-low + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }} if: always() # This is the summary, we just avoid to rename it so that branch protection rules still match diff --git a/workflow-templates/update-nextcloud-ocp-matrix.yml b/workflow-templates/update-nextcloud-ocp-matrix.yml index f50e1bc6..770cc8e5 100644 --- a/workflow-templates/update-nextcloud-ocp-matrix.yml +++ b/workflow-templates/update-nextcloud-ocp-matrix.yml @@ -20,7 +20,7 @@ permissions: jobs: update-nextcloud-ocp: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} # Only allowed to be run on nextcloud repositories if: ${{ github.repository_owner == 'nextcloud' }} diff --git a/workflow-templates/update-nextcloud-ocp.yml b/workflow-templates/update-nextcloud-ocp.yml index 4f7cf81a..dc536ed6 100644 --- a/workflow-templates/update-nextcloud-ocp.yml +++ b/workflow-templates/update-nextcloud-ocp.yml @@ -20,7 +20,7 @@ permissions: jobs: update-nextcloud-ocp: - runs-on: ubuntu-latest + runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST || '"ubuntu-latest"') }} # Only allowed to be run on nextcloud repositories if: ${{ github.repository_owner == 'nextcloud' }} diff --git a/workflow-templates/update-stable-titles.yml b/workflow-templates/update-stable-titles.yml index ca8be8bf..492f8285 100644 --- a/workflow-templates/update-stable-titles.yml +++ b/workflow-templates/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