Loading .github/workflows/merge-group.yml +13 −6 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ jobs: with: persist-credentials: false sparse-checkout: | ci/supportedSystems.json ci/github-script/supportedSystems.js - id: prepare uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 Loading @@ -39,6 +39,8 @@ jobs: with: script: | const { classify } = require('./ci/supportedBranches.js') const supportedSystems = require('./ci/github-script/supportedSystems.js') const baseBranch = ( context.payload.merge_group?.base_ref ?? context.payload.pull_request.base.ref Loading @@ -47,11 +49,16 @@ jobs: core.setOutput('base', baseClassification) core.info('base classification:', baseClassification) core.setOutput('mergedSha', context.payload.merge_group?.head_sha ?? process.env.MERGED_SHA) core.info(`mergedSha: ${context.payload.merge_group?.head_sha ?? process.env.MERGED_SHA}`) core.setOutput('targetSha', context.payload.merge_group?.base_sha ?? process.env.TARGET_SHA) core.info(`targetSha: ${context.payload.merge_group?.base_sha ?? process.env.TARGET_SHA}`) core.setOutput('systems', require('./ci/supportedSystems.json')) const mergedSha = context.payload.merge_group?.head_sha ?? process.env.MERGED_SHA core.setOutput('mergedSha', mergedSha) core.info(`mergedSha: ${mergedSha}`) const targetSha = context.payload.merge_group?.base_sha ?? process.env.TARGET_SHA core.setOutput('targetSha', targetSha) core.info(`targetSha: ${targetSha}`) const systems = await supportedSystems({ github, context, targetSha }) core.setOutput('systems', systems) check: name: Check Loading ci/github-script/prepare.js +3 −1 Original line number Diff line number Diff line const { classify } = require('../supportedBranches.js') const { postReview, dismissReviews } = require('./reviews.js') const reviewKey = 'prepare' const supportedSystems = require('./supportedSystems.js') module.exports = async ({ github, context, core, dry }) => { const pull_number = context.payload.pull_request.number Loading Loading @@ -209,7 +210,8 @@ module.exports = async ({ github, context, core, dry }) => { core.setOutput('mergedSha', mergedSha) core.setOutput('targetSha', targetSha) core.setOutput('systems', require('../supportedSystems.json')) const systems = await supportedSystems({ github, context, targetSha }) core.setOutput('systems', systems) const files = ( await github.paginate(github.rest.pulls.listFiles, { Loading ci/github-script/supportedSystems.js 0 → 100644 +10 −0 Original line number Diff line number Diff line module.exports = async ({ github, context, targetSha }) => { const { content, encoding } = ( await github.rest.repos.getContent({ ...context.repo, path: 'pkgs/top-level/release-supported-systems.json', ref: targetSha, }) ).data return JSON.parse(Buffer.from(content, encoding).toString()) } ci/supportedSystems.jsondeleted 100644 → 0 +0 −6 Original line number Diff line number Diff line [ "aarch64-linux", "aarch64-darwin", "x86_64-linux", "x86_64-darwin" ] Loading
.github/workflows/merge-group.yml +13 −6 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ jobs: with: persist-credentials: false sparse-checkout: | ci/supportedSystems.json ci/github-script/supportedSystems.js - id: prepare uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 Loading @@ -39,6 +39,8 @@ jobs: with: script: | const { classify } = require('./ci/supportedBranches.js') const supportedSystems = require('./ci/github-script/supportedSystems.js') const baseBranch = ( context.payload.merge_group?.base_ref ?? context.payload.pull_request.base.ref Loading @@ -47,11 +49,16 @@ jobs: core.setOutput('base', baseClassification) core.info('base classification:', baseClassification) core.setOutput('mergedSha', context.payload.merge_group?.head_sha ?? process.env.MERGED_SHA) core.info(`mergedSha: ${context.payload.merge_group?.head_sha ?? process.env.MERGED_SHA}`) core.setOutput('targetSha', context.payload.merge_group?.base_sha ?? process.env.TARGET_SHA) core.info(`targetSha: ${context.payload.merge_group?.base_sha ?? process.env.TARGET_SHA}`) core.setOutput('systems', require('./ci/supportedSystems.json')) const mergedSha = context.payload.merge_group?.head_sha ?? process.env.MERGED_SHA core.setOutput('mergedSha', mergedSha) core.info(`mergedSha: ${mergedSha}`) const targetSha = context.payload.merge_group?.base_sha ?? process.env.TARGET_SHA core.setOutput('targetSha', targetSha) core.info(`targetSha: ${targetSha}`) const systems = await supportedSystems({ github, context, targetSha }) core.setOutput('systems', systems) check: name: Check Loading
ci/github-script/prepare.js +3 −1 Original line number Diff line number Diff line const { classify } = require('../supportedBranches.js') const { postReview, dismissReviews } = require('./reviews.js') const reviewKey = 'prepare' const supportedSystems = require('./supportedSystems.js') module.exports = async ({ github, context, core, dry }) => { const pull_number = context.payload.pull_request.number Loading Loading @@ -209,7 +210,8 @@ module.exports = async ({ github, context, core, dry }) => { core.setOutput('mergedSha', mergedSha) core.setOutput('targetSha', targetSha) core.setOutput('systems', require('../supportedSystems.json')) const systems = await supportedSystems({ github, context, targetSha }) core.setOutput('systems', systems) const files = ( await github.paginate(github.rest.pulls.listFiles, { Loading
ci/github-script/supportedSystems.js 0 → 100644 +10 −0 Original line number Diff line number Diff line module.exports = async ({ github, context, targetSha }) => { const { content, encoding } = ( await github.rest.repos.getContent({ ...context.repo, path: 'pkgs/top-level/release-supported-systems.json', ref: targetSha, }) ).data return JSON.parse(Buffer.from(content, encoding).toString()) }
ci/supportedSystems.jsondeleted 100644 → 0 +0 −6 Original line number Diff line number Diff line [ "aarch64-linux", "aarch64-darwin", "x86_64-linux", "x86_64-darwin" ]