@@ -39,7 +39,7 @@ export interface Inputs {
3939 githubToken : string ;
4040}
4141
42- export async function getInputs ( toolkit : Toolkit ) : Promise < Inputs > {
42+ export async function getInputs ( ) : Promise < Inputs > {
4343 return {
4444 addHosts : Util . getInputList ( 'add-hosts' ) ,
4545 allow : Util . getInputList ( 'allow' ) ,
@@ -59,7 +59,7 @@ export async function getInputs(toolkit: Toolkit): Promise<Inputs> {
5959 noCacheFilters : Util . getInputList ( 'no-cache-filters' ) ,
6060 outputs : Util . getInputList ( 'outputs' , { ignoreComma : true } ) ,
6161 platforms : Util . getInputList ( 'platforms' ) ,
62- provenance : toolkit . buildx . inputs . getProvenanceInput ( 'provenance' ) ,
62+ provenance : BuildxInputs . getProvenanceInput ( 'provenance' ) ,
6363 pull : core . getBooleanInput ( 'pull' ) ,
6464 push : core . getBooleanInput ( 'push' ) ,
6565 sbom : core . getInput ( 'sbom' ) ,
@@ -120,7 +120,7 @@ async function getBuildArgs(inputs: Inputs, context: string, toolkit: Toolkit):
120120 args . push ( '--file' , inputs . file ) ;
121121 }
122122 if ( ! BuildxInputs . hasLocalExporter ( inputs . outputs ) && ! BuildxInputs . hasTarExporter ( inputs . outputs ) && ( inputs . platforms . length == 0 || ( await toolkit . buildx . versionSatisfies ( '>=0.4.2' ) ) ) ) {
123- args . push ( '--iidfile' , toolkit . buildx . inputs . getBuildImageIDFilePath ( ) ) ;
123+ args . push ( '--iidfile' , BuildxInputs . getBuildImageIDFilePath ( ) ) ;
124124 }
125125 await Util . asyncForEach ( inputs . labels , async label => {
126126 args . push ( '--label' , label ) ;
@@ -144,10 +144,10 @@ async function getBuildArgs(inputs: Inputs, context: string, toolkit: Toolkit):
144144 if ( GitHub . context . payload . repository ?. private ?? false ) {
145145 // if this is a private repository, we set the default provenance
146146 // attributes being set in buildx: https://github.com/docker/buildx/blob/fb27e3f919dcbf614d7126b10c2bc2d0b1927eb6/build/build.go#L603
147- args . push ( '--provenance' , toolkit . buildx . inputs . resolveProvenanceAttrs ( `mode=min,inline-only=true` ) ) ;
147+ args . push ( '--provenance' , BuildxInputs . resolveProvenanceAttrs ( `mode=min,inline-only=true` ) ) ;
148148 } else {
149149 // for a public repository, we set max provenance mode.
150- args . push ( '--provenance' , toolkit . buildx . inputs . resolveProvenanceAttrs ( `mode=max` ) ) ;
150+ args . push ( '--provenance' , BuildxInputs . resolveProvenanceAttrs ( `mode=max` ) ) ;
151151 }
152152 }
153153 if ( inputs . sbom ) {
@@ -156,20 +156,20 @@ async function getBuildArgs(inputs: Inputs, context: string, toolkit: Toolkit):
156156 }
157157 await Util . asyncForEach ( inputs . secrets , async secret => {
158158 try {
159- args . push ( '--secret' , toolkit . buildx . inputs . resolveBuildSecretString ( secret ) ) ;
159+ args . push ( '--secret' , BuildxInputs . resolveBuildSecretString ( secret ) ) ;
160160 } catch ( err ) {
161161 core . warning ( err . message ) ;
162162 }
163163 } ) ;
164164 await Util . asyncForEach ( inputs . secretFiles , async secretFile => {
165165 try {
166- args . push ( '--secret' , toolkit . buildx . inputs . resolveBuildSecretFile ( secretFile ) ) ;
166+ args . push ( '--secret' , BuildxInputs . resolveBuildSecretFile ( secretFile ) ) ;
167167 } catch ( err ) {
168168 core . warning ( err . message ) ;
169169 }
170170 } ) ;
171171 if ( inputs . githubToken && ! BuildxInputs . hasGitAuthTokenSecret ( inputs . secrets ) && context . startsWith ( Context . gitContext ( ) ) ) {
172- args . push ( '--secret' , toolkit . buildx . inputs . resolveBuildSecretString ( `GIT_AUTH_TOKEN=${ inputs . githubToken } ` ) ) ;
172+ args . push ( '--secret' , BuildxInputs . resolveBuildSecretString ( `GIT_AUTH_TOKEN=${ inputs . githubToken } ` ) ) ;
173173 }
174174 if ( inputs . shmSize ) {
175175 args . push ( '--shm-size' , inputs . shmSize ) ;
@@ -198,7 +198,7 @@ async function getCommonArgs(inputs: Inputs, toolkit: Toolkit): Promise<Array<st
198198 args . push ( '--load' ) ;
199199 }
200200 if ( await toolkit . buildx . versionSatisfies ( '>=0.6.0' ) ) {
201- args . push ( '--metadata-file' , toolkit . buildx . inputs . getBuildMetadataFilePath ( ) ) ;
201+ args . push ( '--metadata-file' , BuildxInputs . getBuildMetadataFilePath ( ) ) ;
202202 }
203203 if ( inputs . network ) {
204204 args . push ( '--network' , inputs . network ) ;
0 commit comments