Multiple workflows started in a single second run concurrently
This action is taking the run_started_at (second precision) from the /repos/{owner}/{repo}/actions/runs/{run_id} api and then waiting for only strictly older workflows to finish. If one runs multiple workflows in a single second, they all output only e.g.
searching for workflow runs before Tue Apr 16 2024 13:03:54 GMT+0000 (Coordinated Universal Time)
found 0 workflow runs
no active run of this workflow found
and continue concurrently.
I think we could amend this filter: https://github.com/ahmadnassri/action-workflow-queue/blob/0781d420efb75f0620ec7d7fc64c9f002af4eb57/src/lib/runs.js#L24
would you happen to know if run.id is incremental? just looking from my action runs it seems to be.
then we could add another statement in here that will also return jobs that have same exact date but lower run_id
I think we could amend this filter:
action-workflow-queue/src/lib/runs.js
Line 24 in 0781d42
.filter(run => new Date(run.run_started_at) < before) would you happen to know if run_id is incremental? just looking from my action runs it seems to be.
then we could add another statement in here that will also return jobs that have same exact date but lower run_id
maybe we can only use run.id and not even compare on timestamp in case it is sequential