-
Notifications
You must be signed in to change notification settings - Fork 0
Description
The Docker image we build is intended to use a directory base
context. With this the image which is built is based upon the commit used inactions/checkout. I intended to just simply dogit rev-parse HEADto get the checked out commit but the issue is that thedocker/metadata-actionwhen generating tags and annotations will end up pulling details about the commit SHA from the workflow metadata. This is why we need to useDOCKER_METADATA_PR_HEAD_SHAat all to instruct the action which SHA to use when running as a PR.I did some experimenting here and tried to create the tags more manually using
type=rawbut ran into issue where thedocker/metadata-actionwould fail when trying to use an arbitrary commit. As this was turning into a rabbit hole I didn't want to keep going down I opted to limit this action to only support PR merge commits and the head commit which are only use cases we use internally.The primary point of concern is we don't want to have our image tags or annotations stating the were built with one commit SHA when in reality they were built with another.
Originally posted by @omus in #1 (comment)