From c3bc6a192283618c6ae92f33bde7c2f28e198539 Mon Sep 17 00:00:00 2001 From: MtnBurrit0 <77340197+mimartin12@users.noreply.github.com> Date: Thu, 18 Apr 2024 16:15:13 -0600 Subject: [PATCH] Add build commit output (#276) --- download-artifacts/action.yml | 2 ++ download-artifacts/main.js | 3 +++ 2 files changed, 5 insertions(+) diff --git a/download-artifacts/action.yml b/download-artifacts/action.yml index 72459462..0bcda75e 100644 --- a/download-artifacts/action.yml +++ b/download-artifacts/action.yml @@ -91,6 +91,8 @@ outputs: description: Boolean output which is true if the artifact was found and false otherwise artifacts: description: JSON array with details about found artifacts + artifact-build-commit: + description: The commit related to the artifact that was found runs: using: node20 main: main.js diff --git a/download-artifacts/main.js b/download-artifacts/main.js index 6dfb46fd..8d27eba0 100644 --- a/download-artifacts/main.js +++ b/download-artifacts/main.js @@ -191,6 +191,9 @@ async function main() { core.setOutput("artifacts", artifacts) + const artifactBuildCommit = artifacts[0].workflow_run.head_sha; + core.setOutput("artifact-build-commit", artifactBuildCommit) + if (dryRun) { if (artifacts.length == 0) { core.setOutput("dry_run", false)