There are so many simple ways for a 1 pixel black line, and you can make your own action. The above ways all work. You can also select all, edit/stroke, inside, 1 pixel, OR, set your background color to black, image/canvas size, check relative, add 1 pixel to each dimension.
Making an action is as simple as naming it, and pressing record.