mirror of
https://code.forgejo.org/forgejo/download-artifact.git
synced 2025-05-16 20:27:48 +02:00
consume latest @actions/toolkit
This commit is contained in:
parent
8b83831f82
commit
465b526e63
2 changed files with 112 additions and 138 deletions
|
@ -1,7 +1,8 @@
|
|||
import * as os from 'os'
|
||||
import * as path from 'path'
|
||||
import * as core from '@actions/core'
|
||||
import * as artifact from '@actions/artifact'
|
||||
import artifactClient from '@actions/artifact'
|
||||
import type {Artifact, FindOptions} from '@actions/artifact'
|
||||
import {Inputs, Outputs} from './constants'
|
||||
|
||||
const PARALLEL_DOWNLOADS = 5
|
||||
|
@ -34,7 +35,7 @@ async function run(): Promise<void> {
|
|||
const resolvedPath = path.resolve(inputs.path)
|
||||
core.debug(`Resolved path is ${resolvedPath}`)
|
||||
|
||||
const options: artifact.FindOptions = {}
|
||||
const options: FindOptions = {}
|
||||
if (inputs.token) {
|
||||
const [repositoryOwner, repositoryName] = inputs.repository.split('/')
|
||||
if (!repositoryOwner || !repositoryName) {
|
||||
|
@ -51,8 +52,7 @@ async function run(): Promise<void> {
|
|||
}
|
||||
}
|
||||
|
||||
const artifactClient = artifact.create()
|
||||
let artifacts: artifact.Artifact[] = []
|
||||
let artifacts: Artifact[] = []
|
||||
|
||||
if (isSingleArtifactDownload) {
|
||||
core.info(`Downloading single artifact`)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue