Skip to content

Commit 22e98e7

Browse files
committed
feat: return commit sha
1 parent cdb050d commit 22e98e7

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ inputs:
2121
description: >
2222
A list of files to commit, prevent other staged files to be commited
2323
Example: src/main.mjs,src/main.spec.js
24+
outputs:
25+
sha:
26+
description: The commit sha for further referencing in your workflow
2427
runs:
2528
using: node16
2629
main: dist/index.mjs

dist/index.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73006,6 +73006,7 @@ try {
7300673006
message
7300773007
)
7300873008
console.log(JSON.stringify({ result, context, branch, repo, message }, undefined, 2))
73009+
_actions_core__WEBPACK_IMPORTED_MODULE_0__.setOutput('sha', result.object?.sha)
7300973010
} catch (error) {
7301073011
_actions_core__WEBPACK_IMPORTED_MODULE_0__.setFailed(error.message)
7301173012
}

src/index.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ try {
2626
message
2727
)
2828
console.log(JSON.stringify({ result, context, branch, repo, message }, undefined, 2))
29+
core.setOutput('sha', result.object?.sha)
2930
} catch (error) {
3031
core.setFailed(error.message)
3132
}

0 commit comments

Comments
 (0)