mirror of https://github.com/actions/toolkit
lint
parent
73ad88882e
commit
e8fb71c4bb
|
@ -1,4 +1,4 @@
|
||||||
import {getRetentionDays, getRuntimeToken} from './config'
|
import {getRuntimeToken} from './config'
|
||||||
import jwt_decode from 'jwt-decode'
|
import jwt_decode from 'jwt-decode'
|
||||||
import {Timestamp} from 'src/generated'
|
import {Timestamp} from 'src/generated'
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ export async function uploadArtifact(
|
||||||
const createArtifactReq: CreateArtifactRequest = {
|
const createArtifactReq: CreateArtifactRequest = {
|
||||||
workflowRunBackendId: backendIds.workflowRunBackendId,
|
workflowRunBackendId: backendIds.workflowRunBackendId,
|
||||||
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
||||||
name: name,
|
name,
|
||||||
version: 4
|
version: 4
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ export async function uploadArtifact(
|
||||||
if (expiresAt) {
|
if (expiresAt) {
|
||||||
createArtifactReq.expiresAt = expiresAt
|
createArtifactReq.expiresAt = expiresAt
|
||||||
}
|
}
|
||||||
const createArtifactResp = await createArtifact(() =>
|
const createArtifactResp = await createArtifact(async () =>
|
||||||
artifactClient.CreateArtifact(createArtifactReq)
|
artifactClient.CreateArtifact(createArtifactReq)
|
||||||
)
|
)
|
||||||
if (!createArtifactResp || !createArtifactResp.ok) {
|
if (!createArtifactResp || !createArtifactResp.ok) {
|
||||||
|
@ -82,11 +82,11 @@ export async function uploadArtifact(
|
||||||
// TODO - Implement upload functionality
|
// TODO - Implement upload functionality
|
||||||
|
|
||||||
// finalize the artifact
|
// finalize the artifact
|
||||||
const finalizeArtifactResp = await finalizeArtifact(() =>
|
const finalizeArtifactResp = await finalizeArtifact(async () =>
|
||||||
artifactClient.FinalizeArtifact({
|
artifactClient.FinalizeArtifact({
|
||||||
workflowRunBackendId: backendIds.workflowRunBackendId,
|
workflowRunBackendId: backendIds.workflowRunBackendId,
|
||||||
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
||||||
name: name,
|
name,
|
||||||
size: '0' // TODO - Add size
|
size: '0' // TODO - Add size
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue