Seeing old complete runs rather than runs in progress, when a run hasn't started yet · Issue #8 · remorses/actions-cli · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a script that pushes a tag, and then immediately calls actions-cli to watch the deploy workflow triggered on: create of that tag.
Right now, I need to insert a sleep in my script, because without it, actions-cli just finds the newest existing run (the one from the last deploy), shows it, and exits.
Although my tag has already been pushed, the relevant workflow-run gets created asynchronously on Github's side, and it seemingly takes a few seconds. So if I invoke actions-cli right away, the new run isn't available yet. Instead, it just sees the old runs, and assumes I wanted to see the newest of those.
But of course, I actually want to see the new run; and if hasn't been created yet, I want actions-cli to wait around until it does get created, and then show its progress.
Proposed fix
Add a timestamp-valued switch to actions-cli, which will tell it to ignore or avoid matching any workflow-runs that were created before the passed timestamp.
Add a boolean switch, to tell actions-cli that if it fails to discover any non-ignored runs (as could happen with the above time-filter in place), it should not exit, but rather should poll the workflow-runs API endpoint until it does successfully find a workflow run that passes the filter.
With these two switches together, I wouldn't need the sleep in my script; instead, I could run e.g. actions-cli --runs-since=... --block-until-found, and it would just sit there until a new workflow-run starts, at which point it would then start logging the progress of that workflow-run.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
I have a script that pushes a tag, and then immediately calls
actions-cli
to watch the deploy workflow triggeredon: create
of that tag.Right now, I need to insert a
sleep
in my script, because without it,actions-cli
just finds the newest existing run (the one from the last deploy), shows it, and exits.Although my tag has already been pushed, the relevant workflow-run gets created asynchronously on Github's side, and it seemingly takes a few seconds. So if I invoke
actions-cli
right away, the new run isn't available yet. Instead, it just sees the old runs, and assumes I wanted to see the newest of those.But of course, I actually want to see the new run; and if hasn't been created yet, I want
actions-cli
to wait around until it does get created, and then show its progress.Proposed fix
actions-cli
, which will tell it to ignore or avoid matching any workflow-runs that were created before the passed timestamp.actions-cli
that if it fails to discover any non-ignored runs (as could happen with the above time-filter in place), it should not exit, but rather should poll the workflow-runs API endpoint until it does successfully find a workflow run that passes the filter.With these two switches together, I wouldn't need the
sleep
in my script; instead, I could run e.g.actions-cli --runs-since=... --block-until-found
, and it would just sit there until a new workflow-run starts, at which point it would then start logging the progress of that workflow-run.The text was updated successfully, but these errors were encountered: