mirror of https://github.com/actions/toolkit
minor fixes
parent
57db7a6302
commit
a59f976dd4
|
@ -125,7 +125,7 @@ If the error persists, please check whether Actions is operating normally at [ht
|
||||||
*/
|
*/
|
||||||
async downloadArtifact(
|
async downloadArtifact(
|
||||||
artifactId: number,
|
artifactId: number,
|
||||||
options?: Partial<DownloadArtifactOptions & FindOptions>
|
options?: DownloadArtifactOptions & FindOptions
|
||||||
): Promise<DownloadArtifactResponse> {
|
): Promise<DownloadArtifactResponse> {
|
||||||
if (isGhes()) {
|
if (isGhes()) {
|
||||||
warning(
|
warning(
|
||||||
|
@ -152,7 +152,7 @@ If the error persists, please check whether Actions is operating normally at [ht
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
return downloadArtifactInternal(artifactId)
|
return downloadArtifactInternal(artifactId, options)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
warning(
|
warning(
|
||||||
`Artifact download failed with error: ${error}.
|
`Artifact download failed with error: ${error}.
|
||||||
|
|
|
@ -12,6 +12,7 @@ import {getGitHubWorkspaceDir} from '../shared/config'
|
||||||
import {internalArtifactTwirpClient} from '../shared/artifact-twirp-client'
|
import {internalArtifactTwirpClient} from '../shared/artifact-twirp-client'
|
||||||
import {
|
import {
|
||||||
GetSignedArtifactURLRequest,
|
GetSignedArtifactURLRequest,
|
||||||
|
Int64Value,
|
||||||
ListArtifactsRequest
|
ListArtifactsRequest
|
||||||
} from '../../generated'
|
} from '../../generated'
|
||||||
import {getBackendIdsFromToken} from '../shared/util'
|
import {getBackendIdsFromToken} from '../shared/util'
|
||||||
|
@ -110,7 +111,8 @@ export async function downloadArtifactInternal(
|
||||||
|
|
||||||
const listReq: ListArtifactsRequest = {
|
const listReq: ListArtifactsRequest = {
|
||||||
workflowRunBackendId,
|
workflowRunBackendId,
|
||||||
workflowJobRunBackendId
|
workflowJobRunBackendId,
|
||||||
|
idFilter: Int64Value.create({value: artifactId.toString()})
|
||||||
}
|
}
|
||||||
|
|
||||||
const {artifacts} = await artifactClient.ListArtifacts(listReq)
|
const {artifacts} = await artifactClient.ListArtifacts(listReq)
|
||||||
|
|
Loading…
Reference in New Issue