Two auto actions that replicate the Blend If (Gray) from Photoshop's Blending Options.
Use the auto action "Blend If Current" to mask the current layer using a selected value range in the Gradient Map window that will appear. The black color indicates the selection area, feel free to move, add or remove gradient points as needed. Ex.: Leave only current layer's highlights visible.
Use the auto action "Blend If Below" to mask current layer to the underlying layer's value range selected in the Gradient Map window that will appear. Ex.: Apply current layer only to the underlying layer's light areas.
Use the auto action "Blend If Below" to mask current layer to the underlying layer's value range selected in the Gradient Map window that will appear. Ex.: Apply current layer only to the underlying layer's light areas.
Note: Both actions create a Layer Folder with the selected layer and mask the folder instead of the layer. This allows you to easily run these auto actions multiple times and stack different Blend If masks on top of each other, almost indefinitely, while keeping the original image intact.
That said, I highly recommend changing your default Layer Folder blending mode to Through, by going to File > Preferences > Layer/Frame and checking the "Use [Through] blending mode for new layer folders". Otherwise, if your original layer has a blending mode different than "Normal", for instance "Multiply", it won't be applied to anything outside of the Folder, unless you manually change the Folder's blending mode to Through.