GitHubWorkflowProps exposes dockerAssetJobSettings to inject setupSteps and extra permissions into Docker-asset publishing jobs, but there is no equivalent for file-asset publishing jobs (Assets-FileAsset*).
The npm install --no-save cdk-assets step in jobForAssetPublish() is hardcoded, so there is no way to configure the npm registry, inject credentials, or add any pre-install step through the public API.
Proposed API
export interface FileAssetJobSettings {
/** Steps to execute before installing cdk-assets and publishing. @default [] */
readonly setupSteps?: github.JobStep[];
/** Additional permissions for file-asset publishing jobs. @default - none */
readonly permissions?: github.JobPermissions;
}
export interface GitHubWorkflowProps extends PipelineBaseProps {
/** Job level settings applied to all file asset publishing jobs. @default - none */
readonly fileAssetJobSettings?: FileAssetJobSettings;
}
setupSteps would be injected immediately before the Install step in jobForAssetPublish(), consistent with how dockerAssetJobSettings.setupSteps is handled for Docker asset jobs.
Use case
Any organisation that needs to configure npm before install - private registry, npm proxy, authentication - currently has no way to do so for file-asset jobs.
Would you be willing to submit a PR?
Yes.
GitHubWorkflowPropsexposesdockerAssetJobSettingsto injectsetupStepsand extrapermissionsinto Docker-asset publishing jobs, but there is no equivalent for file-asset publishing jobs (Assets-FileAsset*).The
npm install --no-save cdk-assetsstep injobForAssetPublish()is hardcoded, so there is no way to configure the npm registry, inject credentials, or add any pre-install step through the public API.Proposed API
setupStepswould be injected immediately before theInstallstep injobForAssetPublish(), consistent with howdockerAssetJobSettings.setupStepsis handled for Docker asset jobs.Use case
Any organisation that needs to configure npm before install - private registry, npm proxy, authentication - currently has no way to do so for file-asset jobs.
Would you be willing to submit a PR?
Yes.