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:
3636 detector-url :
3737 description : ' The URL of the detector. If provided, detector-name and detector-version must also be provided.'
3838 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
3945runs :
4046 using : ' node20'
4147 main : ' dist/index.js'
Original file line number Diff line number Diff line change @@ -60,6 +60,18 @@ async function run() {
6060 snapshot . addManifest ( manifest ) ;
6161 } ) ;
6262
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+
6375 submitSnapshot ( snapshot ) ;
6476}
6577
You can’t perform that action at this time.
0 commit comments