Engineering Elixir Applications B6.0: Do we really want to publish our docker images before merging the PR? (page 134)

I’m following the activities, and just amended my GitHub workflow triggers and noticed that my docker images were published before the PR was submitted.

I’d rather prefer that the CI part is run when the PR is created, but the build and submission of the package only after it is approved and merged.

Am I getting something wrong here?

@rodgco did you create a new branch when pushing the amended GitHub workflow triggers?

As for only building and pushing the images for a PR that is approved and merged - you could do this, yes, but we wouldn’t recommend it. Having your CI build a Docker tag for your PRs (even before they are approved) means that anyone (developers or QA) can easily QA your changes by running the image created in the CI e.g. in a test/staging environment.

Hi @elliefairholm,

Branching was probably what I got wrong. I’ll revisit that part later.

Thanks!