From 2fbe1b8525f2f5ec090674f8cb98286164e987b1 Mon Sep 17 00:00:00 2001 From: Tony133 Date: Thu, 27 Aug 2026 17:30:46 +0200 Subject: [PATCH] ci(workflows): parameterize MySQL and PostgreSQL versions --- .github/workflows/plugins-ci-mysql.yml | 10 +++++++--- .github/workflows/plugins-ci-postgres.yml | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/plugins-ci-mysql.yml b/.github/workflows/plugins-ci-mysql.yml index c3a4de6..7a08a7c 100644 --- a/.github/workflows/plugins-ci-mysql.yml +++ b/.github/workflows/plugins-ci-mysql.yml @@ -23,6 +23,11 @@ on: required: false default: false type: boolean + mysql-version: + description: 'The version of MySQL to use.' + required: false + default: '8.0' + type: string node-versions: description: 'A JSON array that specifies the Node.js versions on which the job should run.' required: false @@ -42,17 +47,16 @@ jobs: lint: ${{ inputs.lint }} test: - name: Node.js ${{ matrix.node-version }} - ${{ matrix.db }} + name: Node.js ${{ matrix.node-version }} - MySQL ${{ inputs.mysql-version }} runs-on: ubuntu-latest permissions: contents: read strategy: matrix: node-version: ${{ fromJson(inputs.node-versions) }} - db: ['mysql:8.0'] services: mysql: - image: ${{ matrix.db }} + image: mysql:${{ inputs.mysql-version }} env: MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' MYSQL_DATABASE: mysql diff --git a/.github/workflows/plugins-ci-postgres.yml b/.github/workflows/plugins-ci-postgres.yml index 33ee6aa..25aebd1 100644 --- a/.github/workflows/plugins-ci-postgres.yml +++ b/.github/workflows/plugins-ci-postgres.yml @@ -23,6 +23,11 @@ on: required: false default: false type: boolean + postgresql-version: + description: 'The version of PostgreSQL to use.' + required: false + default: '18' + type: string node-versions: description: 'A JSON array that specifies the Node.js versions on which the job should run.' required: false @@ -42,17 +47,16 @@ jobs: lint: ${{ inputs.lint }} test: - name: Node.js ${{ matrix.node-version }} - ${{ matrix.db }} + name: Node.js ${{ matrix.node-version }} - PostgreSQL ${{ inputs.postgresql-version }} runs-on: ubuntu-latest permissions: contents: read strategy: matrix: node-version: ${{ fromJson(inputs.node-versions) }} - db: ['postgres:18-alpine'] services: postgres: - image: ${{ matrix.db }} + image: postgres:${{ inputs.postgresql-version }}-alpine env: POSTGRES_USER: postgres POSTGRES_DB: postgres