We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e6e25ac commit 806bb52Copy full SHA for 806bb52
1 file changed
main.js
@@ -218,12 +218,21 @@ async function main() {
218
219
core.info(`==> Downloading: ${artifact.name}.zip (${size})`)
220
221
- const zip = await client.rest.actions.downloadArtifact({
222
- owner: owner,
223
- repo: repo,
224
- artifact_id: artifact.id,
225
- archive_format: "zip",
226
- })
+ let zip;
+ try {
+ zip = await client.rest.actions.downloadArtifact({
+ owner: owner,
+ repo: repo,
+ artifact_id: artifact.id,
227
+ archive_format: "zip",
228
+ })
229
+ } catch (error) {
230
+ if (error.message === "Artifact has expired") {
231
+ return setExitMessage(ifNoArtifactFound, "no downloadable artifacts found (expired)")
232
+ } else {
233
+ throw new Error(error.message)
234
+ }
235
236
237
if (skipUnpack) {
238
fs.mkdirSync(path, { recursive: true })
0 commit comments