diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index fd92284c61..df53eaea32 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -52,16 +52,18 @@ jobs: id: configure shell: node {0} run: | + const fs = require('fs'); + const enableSelfHosted = ${{ inputs.self_hosted }}; + const buildMatrix = JSON.parse(fs.readFileSync("${{ github.workspace }}/build-matrix.json")); // Use enableSelfHosted to decide what the build matrix below should // include. - const {hosted, selfHosted} = require("${{ github.workspace }}/.github/workflows/build-matrix.json"); + const {hosted, selfHosted} = buildMatrix; const include = enableSelfHosted ? hosted.concat(selfHosted) : hosted; const os = include.map((config) => config.os); // Output JSON objects consumed by the build matrix below. - const fs = require('fs'); fs.writeFileSync(process.env.GITHUB_OUTPUT, [ `INCLUDE=${ JSON.stringify(include) }`, diff --git a/.github/workflows/build-matrix.json b/build-matrix.json similarity index 100% rename from .github/workflows/build-matrix.json rename to build-matrix.json