From 0f83fca17fe991ae862b80578570435201d29709 Mon Sep 17 00:00:00 2001 From: Samuel Ryan Date: Sun, 6 Sep 2020 15:57:37 +0100 Subject: [PATCH] :bug: 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 --- .github/workflows/test.yml | 2 +- README.md | 4 ++-- package-lock.json | 2 +- package.json | 2 +- src/extract.js | 1 - 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c516e01..f38f68c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 diff --git a/README.md b/README.md index e468198..087083b 100644 --- a/README.md +++ b/README.md @@ -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 ``` diff --git a/package-lock.json b/package-lock.json index bc03c11..4ffae31 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@shrink/actions-docker-extract", - "version": "0.1.0", + "version": "1.0.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 1235fdc..2f8a284 100644 --- a/package.json +++ b/package.json @@ -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 ", "homepage": "https://github.com/shrink/actions-docker-extract#readme", diff --git a/src/extract.js b/src/extract.js index 28ab202..e3028a9 100644 --- a/src/extract.js +++ b/src/extract.js @@ -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);