From 53265878f04fe398a5d4c8af7d87e797f5902c64 Mon Sep 17 00:00:00 2001 From: Pierre Millot Date: Mon, 15 Jan 2024 09:46:06 +0100 Subject: [PATCH] don't use docker everywhere --- .github/actions/setup/action.yml | 10 ++++++++++ .github/workflows/check.yml | 16 ++++++++-------- .github/workflows/codegen.yml | 8 ++++---- .github/workflows/scheduled-release.yml | 2 ++ scripts/ci/githubActions/createMatrix.ts | 5 +++++ 5 files changed, 29 insertions(+), 12 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 5b087c33ce1..f5feeae09b4 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 611b211861c..8276499651e 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 b9f791a1c9b..47fa6420e16 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 13b1cc57af5..95790f88757 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 ae344dd686e..ddeca227c74 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)); }