If multiple commits are made to main in quick succession that have different assets, then the last one to finish is going to reflect the state the bucket is left in. This is a problem because we only want the last commit's run and the run time of a workflow seems to vary between 1-4 mins. I think the solution is to use something like: https://github.com/styfle/cancel-workflow-action
The workflows/sync-assets.yaml file would be modified to have the cancel job before the other job that either clears out all workflows or specifically the sync workflow.
If multiple commits are made to main in quick succession that have different assets, then the last one to finish is going to reflect the state the bucket is left in. This is a problem because we only want the last commit's run and the run time of a workflow seems to vary between 1-4 mins. I think the solution is to use something like: https://github.com/styfle/cancel-workflow-action
The
workflows/sync-assets.yaml
file would be modified to have the cancel job before the other job that either clears out all workflows or specifically the sync workflow.