Skip to content

Commit c3bc6a1

Browse files
authored
Add build commit output (#276)
1 parent dafb3bc commit c3bc6a1

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

download-artifacts/action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ outputs:
9191
description: Boolean output which is true if the artifact was found and false otherwise
9292
artifacts:
9393
description: JSON array with details about found artifacts
94+
artifact-build-commit:
95+
description: The commit related to the artifact that was found
9496
runs:
9597
using: node20
9698
main: main.js

download-artifacts/main.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,9 @@ async function main() {
191191

192192
core.setOutput("artifacts", artifacts)
193193

194+
const artifactBuildCommit = artifacts[0].workflow_run.head_sha;
195+
core.setOutput("artifact-build-commit", artifactBuildCommit)
196+
194197
if (dryRun) {
195198
if (artifacts.length == 0) {
196199
core.setOutput("dry_run", false)

0 commit comments

Comments
 (0)