build: run on circle hosts for forks (#39858)

This commit is contained in:
Samuel Attard 2023-09-14 08:07:11 -07:00 committed by GitHub
parent f6e8a42c48
commit 2791474a01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 9 deletions

View file

@ -0,0 +1,11 @@
const fs = require('fs');
const PARAMS_PATH = '/tmp/pipeline-parameters.json';
const content = JSON.parse(fs.readFileSync(PARAMS_PATH, 'utf-8'));
// Choose resource class for linux hosts
const currentBranch = process.env.CIRCLE_BRANCH || '';
content['large-linux-executor'] = /^pull\/[0-9-]+$/.test(currentBranch) ? '2xlarge' : 'electronjs/aks-linux-large';
fs.writeFileSync(PARAMS_PATH, JSON.stringify(content));