Skip to content

Commit

Permalink
Add build commit output (#276)
Browse files Browse the repository at this point in the history
  • Loading branch information
mimartin12 committed Apr 18, 2024
1 parent dafb3bc commit c3bc6a1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions download-artifacts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions download-artifacts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c3bc6a1

Please sign in to comment.