ContainerSolutions / externalsecret-operator

An operator to fetch secrets from cloud services and inject them in Kubernetes
Apache License 2.0
189 stars 28 forks source link

Fix CI bug that prevents non-forked branches from being pushed #116

Closed dbirks closed 3 years ago

dbirks commented 3 years ago

Addresses #115

I started adding another condition to that if statement, but noticed it would be less complex to set PUSH_IMAGE to true by default, and only make it false if the PR head is not ContainerSolutions/externalsecret-operator. How does that sound?

codecov[bot] commented 3 years ago

Codecov Report

Merging #116 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #116   +/-   ##
=======================================
  Coverage   86.59%   86.59%           
=======================================
  Files           9        9           
  Lines         261      261           
=======================================
  Hits          226      226           
  Misses         26       26           
  Partials        9        9           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ba30738...5fd2532. Read the comment docs.

knelasevero commented 3 years ago

I am not sure, but I think that github.event.pull_request and all nested values won't exist when CI runs for something not coming from a Pull Request.

dbirks commented 3 years ago

Oh you're right, then '' will not equal ContainerSolutions/externalsecret-operator, and it won't push the image. I'll go back and look at your original comment...

dbirks commented 3 years ago

Ok, I think this now covers everything;

dbirks commented 3 years ago

Ah, it looks like the checks are failing because github.event is an object, and doesn't equal pull_request. Looks like github.event_name is what I want. Trying that...

knelasevero commented 3 years ago

Nice! Let's see with it merging now :)