Skip to content

listen for github actions before applying change #9

@evanugarte

Description

@evanugarte

lets add a feature to ensure that all github actions on a branch passed, before pulling and updating docker

game plan, creating cicd actions

game plan 2, making multiple actions

  • lets merge the first pr, then make a new pr to add another step to the actions file above, with a separate job name
  • to verify, in your second pr, there should now be 2 jobs running.
  • if you run cicd again, with that log line that we add to see payload:
    • what does the json look like when each job completes?
    • what about when all jobs are done?
    • do we get any extra json for all steps being completed

game plan 3 adding action logic to yml

game plan 4: testing it all out

if actions_need_to_pass is true, we need to change some logic

if the webhook sees a push event

  • it should extract the head_commit's id field, and store it to a collections.defaultdict which maps repo name to a set
  • defaultdict example is here

when we see a completedevent

  • extract the head_commit's id field, check if that exists in our defaultdict
  • if it does, verify that all checks passed.
  • if all checks passed, proceed to actually update the repo, and remove the id from the set.

once we have all this, what should our cicd embeds change to be? should we push an embed like "i saw a new commit on main, but i wont update yet because i didnt see a passing action"?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions