diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6a11728..87aa4de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,3 +30,8 @@ jobs: uses: ./ with: args: -h + - + name: Choco install InnoSetup + uses: ./ + with: + args: install innosetup --no-progress diff --git a/dist/index.js b/dist/index.js index 8d046b6..5c19345 100644 --- a/dist/index.js +++ b/dist/index.js @@ -52,11 +52,12 @@ function run() { const args = core.getInput('args', { required: true }); const image = core.getInput('image') || 'ghcr.io/crazy-max/ghaction-chocolatey'; if (os.platform() == 'win32') { - core.info('🏃 Running Choco...'); + core.startGroup("Running choco"); yield exec.exec(`choco.exe ${args} --allow-unofficial`); + core.endGroup(); return; } - core.info('🏃 Running Choco...'); + core.startGroup("Running choco"); fs.writeFileSync('/tmp/env.txt', child_process.execSync(`env`, { encoding: 'utf8' }).trim()); yield exec.exec('docker', [ 'run', @@ -70,10 +71,12 @@ function run() { image, args ]); - core.info('🔨 Fixing perms...'); + core.endGroup(); + core.startGroup('Fixing perms'); const uid = parseInt(child_process.execSync(`id -u`, { encoding: 'utf8' }).trim()); const gid = parseInt(child_process.execSync(`id -g`, { encoding: 'utf8' }).trim()); yield exec.exec('sudo', ['chown', '-R', `${uid}:${gid}`, workspace]); + core.endGroup(); } catch (error) { core.setFailed(error.message); diff --git a/src/main.ts b/src/main.ts index 201834d..4d023fc 100644 --- a/src/main.ts +++ b/src/main.ts @@ -16,12 +16,13 @@ async function run() { const image = core.getInput('image') || 'ghcr.io/crazy-max/ghaction-chocolatey'; if (os.platform() == 'win32') { - core.info('🏃 Running Choco...'); + core.startGroup('Running choco'); await exec.exec(`choco.exe ${args} --allow-unofficial`); + core.endGroup(); return; } - core.info('🏃 Running Choco...'); + core.startGroup('Running choco'); fs.writeFileSync('/tmp/env.txt', child_process.execSync(`env`, {encoding: 'utf8'}).trim()); await exec.exec('docker', [ 'run', @@ -35,11 +36,13 @@ async function run() { image, args ]); + core.endGroup(); - core.info('🔨 Fixing perms...'); + core.startGroup('Fixing perms'); const uid = parseInt(child_process.execSync(`id -u`, {encoding: 'utf8'}).trim()); const gid = parseInt(child_process.execSync(`id -g`, {encoding: 'utf8'}).trim()); await exec.exec('sudo', ['chown', '-R', `${uid}:${gid}`, workspace]); + core.endGroup(); } catch (error) { core.setFailed(error.message); }