Skip to content

Commit 7df3db2

Browse files
committed
Add minimal Step type
1 parent b5e1fb0 commit 7df3db2

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

pr-checks/sync.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ interface Specification extends JobSpecification {
5757
collection?: string;
5858
}
5959

60+
/** Minimal type to represent steps in Actions workflows. */
61+
interface Step {
62+
name?: string;
63+
[other: string]: any;
64+
}
65+
6066
/** Represents job specifications. */
6167
interface JobSpecification {
6268
/** The display name for the check. */
@@ -67,7 +73,7 @@ interface JobSpecification {
6773
env?: Record<string, any>;
6874

6975
/** The workflow steps specific to this check. */
70-
steps: any[];
76+
steps: Step[];
7177

7278
installNode?: boolean;
7379
installGo?: boolean;
@@ -82,7 +88,7 @@ interface LanguageSetup {
8288
specProperty: keyof JobSpecification;
8389
/** The names of the known inputs which are required for this setup step. */
8490
inputs?: KnownInputName[];
85-
steps: any[];
91+
steps: Step[];
8692
}
8793

8894
/** Describes partial mappings from known languages to their specific setup information. */
@@ -363,10 +369,10 @@ function generateJobMatrix(
363369
*/
364370
function getSetupSteps(checkSpecification: JobSpecification): {
365371
inputs: Set<KnownInputName>;
366-
steps: any[];
372+
steps: Step[];
367373
} {
368374
const inputs: Array<Set<KnownInputName>> = [];
369-
const steps: any[] = [];
375+
const steps: Step[] = [];
370376

371377
for (const language of Object.values(KnownLanguage).sort()) {
372378
const setupSpec = languageSetups[language];
@@ -426,7 +432,7 @@ function generateJob(
426432
const workflowInputs = setupInfo.inputs;
427433

428434
// Construct the workflow steps needed for this check.
429-
const steps: any[] = [
435+
const steps: Step[] = [
430436
{
431437
name: "Check out repository",
432438
uses: "actions/checkout@v6",

0 commit comments

Comments
 (0)