Closed ajschmidt8 closed 2 years ago
In hindsight, I don't think this can be simplified too much more. The following didn't work:
secrets
object can't be used in conditional statements (src)github
object (docs) - the GitHub object's top-level properties don't provide any values to know whether a given workflow is executing on a fork. Evaluating the github.event
properties also doesn't work since our shared workflow is executed on two different events (i.e. pull-request
and push
) and therefore has two different payloadsThis isn't a huge deal, so we'll just keep things as-is for now.
The
Login to DockerHub
step should only be performed on non-forks (i.e. the source repo), since the secrets aren't available in forks. This PR simplifies the logic to make that happen.Closes #4.