Sonar scan fails with not supported node version

Hello, I am currently facing an error with the sonar scan which started happening a few days ago. I am using the GitHub action to run the scan:

INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 30.869s
INFO: Final Memory: 22M/80M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
ERROR: 

The version of node.js (12) you have used to run this analysis is deprecated and we stopped accepting it.
Please update to at least node.js 14. You can find more information here: https://docs.sonarcloud.io/appendices/scanner-environment/

ERROR: 
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.

build.yml:

name: Sonar analysis
on:
  push:
    branches:
      - main
      - next
  pull_request:
    types: [opened, synchronize, reopened]
    branches:
      - main
      - next
jobs:
  sonarcloud:
    name: SonarCloud
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0  
      - name: Use Node.js 18
        uses: actions/setup-node@v3
        with:
          node-version: '18.x'
          cache: 'npm'
      - name: Install dependencies
        run: npm ci
      - name: Test and coverage
        run: npm run test:coverage
      - name: SonarCloud Scan
        uses: SonarSource/sonarcloud-github-action@v1.9.1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 
          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

I tried looking at some of the already reported issues but couldn’t find anything just to always use up-to-date action which I am doing. I’ve tried using some previous action versions, but facing the same error. Any help is appreciated.

Recently Sonar pushed a faulty docker image (SC-4361 Update sonar-scanner-cli to v4.8 (#47) · SonarSource/sonarcloud-github-action@db50107 · GitHub).

As per the other thread the workaround is to pin sonarcloud-github-action version to 1.8 (instead of master).

Tnx, this fixed it