diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 5b087c33ce..f5feeae09b 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -3,6 +3,9 @@ name: Setup description: Setup CI environment. inputs: + install-node: + description: If true, it will install the node with the version from .nvmrc. + required: false javascript-utils: description: If true, it will also restore the cache of the javascript util packages. required: false @@ -22,6 +25,13 @@ runs: git config --global --add safe.directory /__w/api-clients-automation/api-clients-automation # JavaScript for monorepo and tooling + - name: Install Node + if: ${{ inputs.install-node == 'true' }} + uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + cache: yarn + - name: Get yarn cache directory path shell: bash id: yarn-cache-dir diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 611b211861..8276499651 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -20,8 +20,6 @@ concurrency: jobs: setup: runs-on: ubuntu-22.04 - container: - image: ghcr.io/algolia/apic-base defaults: run: shell: bash @@ -39,6 +37,8 @@ jobs: - name: Setup id: setup uses: ./.github/actions/setup + with: + install-node: true - name: Validate gradle wrapper uses: gradle/wrapper-validation-action@v1 @@ -103,8 +103,6 @@ jobs: scripts: runs-on: ubuntu-22.04 - container: - image: ghcr.io/algolia/apic-base timeout-minutes: 10 needs: setup if: ${{ needs.setup.outputs.RUN_SCRIPTS == 'true' }} @@ -113,6 +111,8 @@ jobs: - name: Setup uses: ./.github/actions/setup + with: + install-node: true - name: Check script linting run: yarn scripts:lint @@ -125,8 +125,6 @@ jobs: specs: runs-on: ubuntu-22.04 - container: - image: ghcr.io/algolia/apic-base timeout-minutes: 10 needs: setup steps: @@ -142,6 +140,8 @@ jobs: - name: Setup if: ${{ steps.cache.outputs.cache-hit != 'true' }} uses: ./.github/actions/setup + with: + install-node: true - name: Building specs if: ${{ steps.cache.outputs.cache-hit != 'true' }} @@ -392,8 +392,6 @@ jobs: codegen: runs-on: ubuntu-22.04 - container: - image: ghcr.io/algolia/apic-base timeout-minutes: 10 needs: - setup @@ -418,6 +416,8 @@ jobs: - name: Setup uses: ./.github/actions/setup + with: + install-node: true - name: Push generated code id: pushGeneratedCode diff --git a/.github/workflows/codegen.yml b/.github/workflows/codegen.yml index b9f791a1c9..47fa6420e1 100644 --- a/.github/workflows/codegen.yml +++ b/.github/workflows/codegen.yml @@ -7,8 +7,6 @@ on: jobs: notification: runs-on: ubuntu-22.04 - container: - image: ghcr.io/algolia/apic-base timeout-minutes: 10 if: (github.event.action == 'opened' || github.event.action == 'synchronize') && github.event.number steps: @@ -19,6 +17,8 @@ jobs: - name: Setup uses: ./.github/actions/setup + with: + install-node: true - name: Add notification comment run: yarn workspace scripts upsertGenerationComment notification @@ -29,8 +29,6 @@ jobs: cleanup: runs-on: ubuntu-22.04 - container: - image: ghcr.io/algolia/apic-base timeout-minutes: 10 if: github.event.action == 'closed' steps: @@ -41,6 +39,8 @@ jobs: - name: Setup uses: ./.github/actions/setup + with: + install-node: true - name: Add cleanup comment run: yarn workspace scripts upsertGenerationComment cleanup diff --git a/.github/workflows/scheduled-release.yml b/.github/workflows/scheduled-release.yml index 13b1cc57af..95790f8875 100644 --- a/.github/workflows/scheduled-release.yml +++ b/.github/workflows/scheduled-release.yml @@ -22,6 +22,8 @@ jobs: - name: Setup id: setup uses: ./.github/actions/setup + with: + install-node: true - run: yarn release env: diff --git a/scripts/ci/githubActions/createMatrix.ts b/scripts/ci/githubActions/createMatrix.ts index ae344dd686..ddeca227c7 100644 --- a/scripts/ci/githubActions/createMatrix.ts +++ b/scripts/ci/githubActions/createMatrix.ts @@ -161,6 +161,11 @@ async function createClientMatrix(baseBranch: string): Promise { clientMatrix.client.splice(swiftIndex, 1); } + const phpIndex = clientMatrix.client.findIndex((c) => c.language === 'php'); + if (phpIndex !== -1) { + clientMatrix.client.splice(phpIndex, 1); + } + core.setOutput('RUN_GEN', shouldRun); core.setOutput('GEN_MATRIX', JSON.stringify(shouldRun ? clientMatrix : EMPTY_MATRIX)); }