mirror of https://github.com/actions/toolkit
prettier
parent
b851b70474
commit
08d6314f7c
|
@ -11,7 +11,9 @@ interface ActionsToken {
|
||||||
scp: string
|
scp: string
|
||||||
}
|
}
|
||||||
|
|
||||||
const InvalidJwtError = new Error('Failed to get backend IDs: The provided JWT token is invalid')
|
const InvalidJwtError = new Error(
|
||||||
|
'Failed to get backend IDs: The provided JWT token is invalid'
|
||||||
|
)
|
||||||
|
|
||||||
// uses the JWT token claims to get the
|
// uses the JWT token claims to get the
|
||||||
// workflow run and workflow job run backend ids
|
// workflow run and workflow job run backend ids
|
||||||
|
|
|
@ -57,7 +57,9 @@ export async function uploadArtifact(
|
||||||
createArtifactReq.expiresAt = expiresAt
|
createArtifactReq.expiresAt = expiresAt
|
||||||
}
|
}
|
||||||
|
|
||||||
const createArtifactResp = await artifactClient.CreateArtifact(createArtifactReq)
|
const createArtifactResp = await artifactClient.CreateArtifact(
|
||||||
|
createArtifactReq
|
||||||
|
)
|
||||||
if (!createArtifactResp.ok) {
|
if (!createArtifactResp.ok) {
|
||||||
core.warning(`Failed to create artifact`)
|
core.warning(`Failed to create artifact`)
|
||||||
return {
|
return {
|
||||||
|
@ -68,14 +70,12 @@ export async function uploadArtifact(
|
||||||
// TODO - Implement upload functionality
|
// TODO - Implement upload functionality
|
||||||
|
|
||||||
// finalize the artifact
|
// finalize the artifact
|
||||||
const finalizeArtifactResp = await artifactClient.FinalizeArtifact(
|
const finalizeArtifactResp = await artifactClient.FinalizeArtifact({
|
||||||
{
|
|
||||||
workflowRunBackendId: backendIds.workflowRunBackendId,
|
workflowRunBackendId: backendIds.workflowRunBackendId,
|
||||||
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
||||||
name,
|
name,
|
||||||
size: '0' // TODO - Add size
|
size: '0' // TODO - Add size
|
||||||
}
|
})
|
||||||
)
|
|
||||||
if (!finalizeArtifactResp.ok) {
|
if (!finalizeArtifactResp.ok) {
|
||||||
core.warning(`Failed to finalize artifact`)
|
core.warning(`Failed to finalize artifact`)
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in New Issue