🐛 Remove creation of extract destination (#3)

https://docs.docker.com/engine/reference/commandline/cp/

Current behaviour:

> DEST_PATH exists and is a directory [...] the source directory is copied into this directory

Desired behaviour:

> DEST_PATH is created as a directory and the contents of the source directory are copied into this directory
This commit is contained in:
Samuel Ryan 2020-09-06 15:57:37 +01:00 committed by GitHub
parent f393b455c4
commit 0f83fca17f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 6 deletions

View file

@ -46,5 +46,5 @@ jobs:
- name: Upload Dist
uses: actions/upload-artifact@v2
with:
path: ${{ steps.extract.outputs.destination }}/app
path: ${{ steps.extract.outputs.destination }}
name: dist

View file

@ -50,7 +50,7 @@ jobs:
- name: Upload Dist
uses: actions/upload-artifact@v2
with:
path: ${{ steps.extract.outputs.destination }}/app
path: ${{ steps.extract.outputs.destination }}
name: dist
```
@ -78,7 +78,7 @@ jobs:
- name: Upload Dist
uses: actions/upload-artifact@v2
with:
path: ${{ steps.extract.outputs.destination }}/app
path: ${{ steps.extract.outputs.destination }}
name: dist
```

2
package-lock.json generated
View file

@ -1,6 +1,6 @@
{
"name": "@shrink/actions-docker-extract",
"version": "0.1.0",
"version": "1.0.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View file

@ -1,6 +1,6 @@
{
"name": "@shrink/actions-docker-extract",
"version": "1.0.1",
"version": "1.0.2",
"description": "Extract from a Docker Image",
"author": "Samuel Ryan <sam@samryan.co.uk>",
"homepage": "https://github.com/shrink/actions-docker-extract#readme",

View file

@ -8,7 +8,6 @@ async function run() {
const destination = `.extracted-${Date.now()}`;
const create = `docker cp $(docker create ${image}):/${path} ${destination}`;
await exec.exec(`mkdir -p ${destination}`);
await exec.exec(`/bin/bash -c "${create}"`, []);
core.setOutput('destination', destination);