mirror of
https://forgejo.merr.is/annika/actions-docker-extract.git
synced 2025-12-10 15:43:14 -05:00
🐛 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:
parent
f393b455c4
commit
0f83fca17f
5 changed files with 5 additions and 6 deletions
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
|
|
@ -46,5 +46,5 @@ jobs:
|
||||||
- name: Upload Dist
|
- name: Upload Dist
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.extract.outputs.destination }}/app
|
path: ${{ steps.extract.outputs.destination }}
|
||||||
name: dist
|
name: dist
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ jobs:
|
||||||
- name: Upload Dist
|
- name: Upload Dist
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.extract.outputs.destination }}/app
|
path: ${{ steps.extract.outputs.destination }}
|
||||||
name: dist
|
name: dist
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -78,7 +78,7 @@ jobs:
|
||||||
- name: Upload Dist
|
- name: Upload Dist
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.extract.outputs.destination }}/app
|
path: ${{ steps.extract.outputs.destination }}
|
||||||
name: dist
|
name: dist
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
2
package-lock.json
generated
2
package-lock.json
generated
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@shrink/actions-docker-extract",
|
"name": "@shrink/actions-docker-extract",
|
||||||
"version": "0.1.0",
|
"version": "1.0.2",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@shrink/actions-docker-extract",
|
"name": "@shrink/actions-docker-extract",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"description": "Extract from a Docker Image",
|
"description": "Extract from a Docker Image",
|
||||||
"author": "Samuel Ryan <sam@samryan.co.uk>",
|
"author": "Samuel Ryan <sam@samryan.co.uk>",
|
||||||
"homepage": "https://github.com/shrink/actions-docker-extract#readme",
|
"homepage": "https://github.com/shrink/actions-docker-extract#readme",
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ async function run() {
|
||||||
const destination = `.extracted-${Date.now()}`;
|
const destination = `.extracted-${Date.now()}`;
|
||||||
const create = `docker cp $(docker create ${image}):/${path} ${destination}`;
|
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(`/bin/bash -c "${create}"`, []);
|
||||||
|
|
||||||
core.setOutput('destination', destination);
|
core.setOutput('destination', destination);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue