@@ -18,10 +18,19 @@ async function run(): Promise<void> {
18
18
const image : string = core . getInput ( 'image' ) || 'tonistiigi/binfmt:latest' ;
19
19
const platforms : string = core . getInput ( 'platforms' ) || 'all' ;
20
20
21
- core . info ( `💎 Installing QEMU static binaries...` ) ;
21
+ core . startGroup ( `⬇️ Downloading binfmt Docker image` ) ;
22
+ await exec . exec ( 'docker' , [ 'pull' , '-q' , image ] ) ;
23
+ core . endGroup ( ) ;
24
+
25
+ core . startGroup ( `🔫 Uninstalling current emulators...` ) ;
26
+ await exec . exec ( 'docker' , [ 'run' , '--rm' , '--privileged' , image , '--uninstall' , 'qemu-' ] ) ;
27
+ core . endGroup ( ) ;
28
+
29
+ core . startGroup ( `💎 Installing QEMU static binaries...` ) ;
22
30
await exec . exec ( 'docker' , [ 'run' , '--rm' , '--privileged' , image , '--install' , platforms ] ) ;
31
+ core . endGroup ( ) ;
23
32
24
- core . info ( '🛒 Extracting available platforms...' ) ;
33
+ core . startGroup ( '🛒 Extracting available platforms...' ) ;
25
34
await mexec . exec ( `docker` , [ 'run' , '--rm' , '--privileged' , image ] , true ) . then ( res => {
26
35
if ( res . stderr != '' && ! res . success ) {
27
36
throw new Error ( res . stderr ) ;
@@ -30,6 +39,7 @@ async function run(): Promise<void> {
30
39
core . info ( `${ platforms . supported . join ( ',' ) } ` ) ;
31
40
core . setOutput ( 'platforms' , platforms . supported . join ( ',' ) ) ;
32
41
} ) ;
42
+ core . endGroup ( ) ;
33
43
} catch ( error ) {
34
44
core . setFailed ( error . message ) ;
35
45
}
0 commit comments