mirror of
https://forgejo.merr.is/annika/actions-docker-extract.git
synced 2025-12-10 13:13:15 -05:00
Trying To Add The Ability To Specify The Shell Command Used
This commit is contained in:
parent
15c8bf3149
commit
8f00ad1f71
1 changed files with 2 additions and 1 deletions
|
|
@ -3,6 +3,7 @@ const exec = require('@actions/exec');
|
|||
|
||||
async function run() {
|
||||
try {
|
||||
const shell = core.getInput('shell_command') || "/bin/bash -c";
|
||||
const image = core.getInput('image');
|
||||
const path = core.getInput('path');
|
||||
const destination = core.getInput('destination') || `.extracted-${Date.now()}`;
|
||||
|
|
@ -10,7 +11,7 @@ async function run() {
|
|||
const create = `docker cp $(docker create ${image}):/${path} ${destination}`;
|
||||
|
||||
await exec.exec(`mkdir -p ${destination}`);
|
||||
await exec.exec(`/bin/bash -c "${create}"`, []);
|
||||
await exec.exec(`${shell} "${create}"`, []);
|
||||
|
||||
core.setOutput('destination', destination);
|
||||
} catch (error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue