ci: make runner labels configurable via CI_RUNNERS variable (#1023)

Switch all workflow jobs from a hardcoded ubuntu-latest to ${{
vars.CI_RUNNERS || 'ubuntu-latest' }}, so runner sizing can be changed
via the CI_RUNNERS organization/repository variable without editing
workflow files.

The cloudnative-pg organization CI_RUNNERS variable is already set to
ubuntu-latest-16-cores.

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
This commit is contained in:
Marco Nenciarini 2026-07-20 18:17:21 +02:00 committed by GitHub
parent 98537c4d0e
commit f386c2d85a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 7 additions and 5 deletions

View File

@ -8,12 +8,13 @@ permissions: read-all
jobs: jobs:
ci: ci:
runs-on: ubuntu-latest runs-on: ${{ vars.CI_RUNNERS || 'ubuntu-latest' }}
permissions: permissions:
packages: write packages: write
contents: write contents: write
steps: steps:
- name: Cleanup Disk - name: Cleanup Disk
if: vars.CI_RUNNERS == '' || vars.CI_RUNNERS == 'ubuntu-latest'
uses: jlumbroso/free-disk-space@v1.3.1 uses: jlumbroso/free-disk-space@v1.3.1
with: with:
android: true android: true
@ -23,6 +24,7 @@ jobs:
large-packages: false large-packages: false
swap-storage: false swap-storage: false
- name: Cleanup docker cache - name: Cleanup docker cache
if: vars.CI_RUNNERS == '' || vars.CI_RUNNERS == 'ubuntu-latest'
run: | run: |
echo "-------------Disk info before cleanup----------------" echo "-------------Disk info before cleanup----------------"
df -h df -h

View File

@ -20,7 +20,7 @@ permissions: read-all
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ${{ vars.CI_RUNNERS || 'ubuntu-latest' }}
permissions: permissions:
contents: read contents: read
steps: steps:
@ -60,7 +60,7 @@ jobs:
name: github-pages name: github-pages
url: ${{ steps.deployment.outputs.page_url }} url: ${{ steps.deployment.outputs.page_url }}
needs: build needs: build
runs-on: ubuntu-latest runs-on: ${{ vars.CI_RUNNERS || 'ubuntu-latest' }}
steps: steps:
- name: Deploy to GitHub Pages - name: Deploy to GitHub Pages
id: deployment id: deployment

View File

@ -9,7 +9,7 @@ permissions: read-all
jobs: jobs:
release-please: release-please:
runs-on: ubuntu-latest runs-on: ${{ vars.CI_RUNNERS || 'ubuntu-latest' }}
permissions: permissions:
contents: write contents: write
pull-requests: write pull-requests: write

View File

@ -7,7 +7,7 @@ permissions: read-all
jobs: jobs:
release-publish-artifacts: release-publish-artifacts:
runs-on: ubuntu-latest runs-on: ${{ vars.CI_RUNNERS || 'ubuntu-latest' }}
permissions: permissions:
packages: write packages: write
contents: write contents: write