improve comments about the sha and ref inputs
This commit is contained in:
@@ -119,15 +119,17 @@ async function main () {
|
|||||||
})
|
})
|
||||||
snapshot.addManifest(manifest)
|
snapshot.addManifest(manifest)
|
||||||
|
|
||||||
|
// only override the sha if the input has a value
|
||||||
|
// otherwise, continue to use the sha set from the context in the Snapshot constructor
|
||||||
const inputSHA = core.getInput('sha')
|
const inputSHA = core.getInput('sha')
|
||||||
if (inputSHA !== '') {
|
if (inputSHA !== '') {
|
||||||
// only set the SHA if it is not empty; otherwise, use the SHA from the context
|
|
||||||
snapshot.sha = inputSHA
|
snapshot.sha = inputSHA
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// only override the ref if the input has a value
|
||||||
|
// otherwise, continue to use the ref set from the context in the Snapshot constructor
|
||||||
const inputRef = core.getInput('ref')
|
const inputRef = core.getInput('ref')
|
||||||
if (inputRef !== '') {
|
if (inputRef !== '') {
|
||||||
// only set the ref if it is not empty; otherwise, use the ref from the context
|
|
||||||
snapshot.ref = inputRef
|
snapshot.ref = inputRef
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user