[testing workflows] Add pre-release checks (#50204)

This commit is contained in:
Adrian Moldovan 2024-08-01 12:48:58 +01:00 committed by GitHub
parent a73c6e5546
commit 0ba308247a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 0 deletions

View File

@ -51,6 +51,8 @@ jobs:
// Intended behaviour of the jobs generation: // Intended behaviour of the jobs generation:
// - PRs: run CI jobs aiming PRs and filter out jobs based on the content changes // - PRs: run CI jobs aiming PRs and filter out jobs based on the content changes
// - Pushes: run CI jobs aiming pushes without filtering based on the content changes // - Pushes: run CI jobs aiming pushes without filtering based on the content changes
// github.base_ref is only available for pull_request events
let baseRef = ${{ toJson( github.base_ref ) }}; let baseRef = ${{ toJson( github.base_ref ) }};
if ( baseRef ) { if ( baseRef ) {
baseRef = `--base-ref origin/${ baseRef }`; baseRef = `--base-ref origin/${ baseRef }`;
@ -74,6 +76,12 @@ jobs:
githubEvent = trigger; githubEvent = trigger;
} }
// `pre-release` should trigger `release-checks`, but without a 'tag' ref.
// This will run all release-checks against the branch the workflow targeted, instead of a release artifact.
if ( trigger === 'pre-release' ) {
githubEvent = 'release-checks';
}
const child_process = require( 'node:child_process' ); const child_process = require( 'node:child_process' );
child_process.execSync( `pnpm utils ci-jobs ${ baseRef } --event ${ githubEvent }` ); child_process.execSync( `pnpm utils ci-jobs ${ baseRef } --event ${ githubEvent }` );