reverse the upload order

This commit is contained in:
Conor Sloan
2024-08-22 20:30:50 +01:00
parent 028b950050
commit da1f4d6352
2 changed files with 18 additions and 18 deletions
+14 -14
View File
@@ -53,20 +53,6 @@ export async function run(): Promise<void> {
const manifestDigest = ociContainer.sha256Digest(manifest)
const publishedDigest = await publishImmutableActionVersion(
options,
semverTag.raw,
archives.zipFile,
archives.tarFile,
manifest
)
if (manifestDigest !== publishedDigest) {
throw new Error(
`Unexpected digest returned for manifest. Expected ${manifestDigest}, got ${publishedDigest}`
)
}
// Attestations are not supported in GHES.
if (!options.isEnterprise) {
const { bundle, bundleDigest } = await generateAttestation(
@@ -109,6 +95,20 @@ export async function run(): Promise<void> {
}
}
const publishedDigest = await publishImmutableActionVersion(
options,
semverTag.raw,
archives.zipFile,
archives.tarFile,
manifest
)
if (manifestDigest !== publishedDigest) {
throw new Error(
`Unexpected digest returned for manifest. Expected ${manifestDigest}, got ${publishedDigest}`
)
}
core.setOutput('package-manifest-sha', publishedDigest)
} catch (error) {
// Fail the workflow run if an error occurs