File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,12 @@ inputs:
36
36
detector-url :
37
37
description : ' The URL of the detector. If provided, detector-name and detector-version must also be provided.'
38
38
required : false
39
+ snapshot-sha :
40
+ description : ' The SHA of the commit to associate with the snapshot. If provided, snapshot-ref must also be provided.'
41
+ required : false
42
+ snapshot-ref :
43
+ description : ' The Git reference to associate with the snapshot. If provided, snapshot-sha must also be provided.'
44
+ required : false
39
45
runs :
40
46
using : ' node20'
41
47
main : ' dist/index.js'
Original file line number Diff line number Diff line change @@ -60,6 +60,18 @@ async function run() {
60
60
snapshot . addManifest ( manifest ) ;
61
61
} ) ;
62
62
63
+ // Override snapshot ref and sha if provided
64
+ const snapshotSha = core . getInput ( "snapshot-sha" ) ?. trim ( ) ;
65
+ const snapshotRef = core . getInput ( "snapshot-ref" ) ?. trim ( ) ;
66
+
67
+ if ( snapshotSha ) {
68
+ snapshot . sha = snapshotSha ;
69
+ }
70
+
71
+ if ( snapshotRef ) {
72
+ snapshot . ref = snapshotRef ;
73
+ }
74
+
63
75
submitSnapshot ( snapshot ) ;
64
76
}
65
77
You can’t perform that action at this time.
0 commit comments