Skip to content

Commit d45f548

Browse files
committed
use 'unzip' instead of a library
1 parent 4f461a3 commit d45f548

405 files changed

Lines changed: 1547 additions & 47802 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

main.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
const core = require('@actions/core')
22
const github = require('@actions/github')
3-
const ab2b = require('arraybuffer-to-buffer')
4-
const stream = require('stream')
5-
const unzip = require('unzipper');
3+
const exec = require('@actions/exec')
4+
const fs = require('fs')
65

76
async function main() {
87
try {
98
const token = core.getInput("github_token", { required: true })
109
const workflow = core.getInput("workflow", { required: true })
1110
const name = core.getInput("name", { required: true })
1211
const [owner, repo] = core.getInput("repo", { required: true }).split("/")
13-
const path = core.getInput("path", {required: true})
12+
const path = core.getInput("path", { required: true })
1413
const pr = core.getInput("pr")
1514
let commit = core.getInput("commit")
1615

@@ -96,9 +95,9 @@ async function main() {
9695
archive_format: format,
9796
})
9897

99-
new stream.PassThrough()
100-
.end(ab2b(zip.data))
101-
.pipe(unzip.Extract({ path: path }))
98+
const file = `/tmp/${artifact.id}.${format}`
99+
fs.writeFileSync(file, Buffer.from(zip.data))
100+
await exec.exec("unzip", ["-d", path, file])
102101
} catch (error) {
103102
core.setFailed(error.message)
104103
}

node_modules/.bin/mkdirp

Lines changed: 0 additions & 1 deletion
This file was deleted.

node_modules/.bin/rimraf

Lines changed: 0 additions & 1 deletion
This file was deleted.

node_modules/@actions/exec/README.md

Lines changed: 57 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@actions/exec/lib/exec.d.ts

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@actions/exec/lib/exec.js

Lines changed: 37 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@actions/exec/lib/exec.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@actions/exec/lib/interfaces.d.ts

Lines changed: 35 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@actions/exec/lib/interfaces.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@actions/exec/lib/interfaces.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)