mirror of
https://github.com/deployphp/action.git
synced 2025-02-21 18:50:26 +00:00
feat: hide manifest in logs
This commit is contained in:
parent
280404946f
commit
1d2a8aff4a
1 changed files with 8 additions and 3 deletions
9
index.js
9
index.js
|
@ -1,5 +1,5 @@
|
||||||
import core from '@actions/core'
|
import core from '@actions/core'
|
||||||
import { $, fs, cd } from 'zx'
|
import { $, fs, cd, fetch } from 'zx'
|
||||||
|
|
||||||
void async function main() {
|
void async function main() {
|
||||||
try {
|
try {
|
||||||
|
@ -86,7 +86,12 @@ async function dep() {
|
||||||
throw new Error('Deployer binary not found. Please specify deployer-binary or deployer-version.')
|
throw new Error('Deployer binary not found. Please specify deployer-binary or deployer-version.')
|
||||||
}
|
}
|
||||||
version = version.replace(/^v/, '')
|
version = version.replace(/^v/, '')
|
||||||
let manifest = JSON.parse((await $`curl -L https://deployer.org/manifest.json`).stdout)
|
const response = await fetch(`https://deployer.org/manifest.json`)
|
||||||
|
if (!response.ok) {
|
||||||
|
const body = await response.text()
|
||||||
|
throw new Error(`Manifest can be downloaded. ${response.status} ${body}`)
|
||||||
|
}
|
||||||
|
let manifest = await response.json()
|
||||||
let url
|
let url
|
||||||
for (let asset of manifest) {
|
for (let asset of manifest) {
|
||||||
if (asset.version === version) {
|
if (asset.version === version) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue