Comments (17)
I should have time tomorrow, if it's fine with @styfle , I'll take another look at this.
from cancel-workflow-action.
@JoseThen Indeed, we would need this feature in obrassard/action-dokku-push
(see : obrassard/action-dokku-push#5). To resume, we use cancel-workflow-action
to cancel concurrent builds and we would need an output to know if a previous build was cancelled or not (because additional steps must be executed in this case).
from cancel-workflow-action.
That would be great to have, simple and concise.
from cancel-workflow-action.
Wouldn't it be better to use outputs
instead?
Also, what would the value be?
from cancel-workflow-action.
Also see #23 (comment)
from cancel-workflow-action.
Wouldn't it be better to use
outputs
instead?Also, what would the value be?
Using outputs
sounds like the way to go. Going to have to test some more but wonder how I would get runningWorkflows.length
as a value. That way I can add that as the output and run some commands based on the value.
from cancel-workflow-action.
Hello @JoseThen and @styfle, I hope you're doing well !
Do you have any update on this issue 😄 ?
from cancel-workflow-action.
Actually no updates from me, I should close this issue, are you needing this specific function for your use case? If so you mind saying what it is?
from cancel-workflow-action.
Thanks !!
from cancel-workflow-action.
So I did some light testing with main...JoseThen:main . I guess the real question is how far you want to go with this "feature".
Example: https://github.com/JoseThen/cancel-workflow-action/runs/1236893939?check_suite_focus=true check Results step
from cancel-workflow-action.
@JoseThen Thanks for your feedback. To answer your question, we don't need much details only a way to know if a previous build was cancelled by the action or not. So a success
/ failure
flag is enough for our use case. However, I might be wrong, but it seems that in your branch you set core.setOutput('RESULT', 'failure');
only when there is an error (in the catch
block), but we would also need to get the failure
(or something else) flag in the case where there is no error, but no previous action was running / cancelled. Don't hesitate, to @ me if something is not clear !😅
from cancel-workflow-action.
I read the original description of the issue and I don’t think we can determine “successfully canceling a previous run” easily.
The problem is that the GitHub API response is 202 Accepted meaning that the action finishes before GitHub actually cancels the workflow. See #23 for more info.
from cancel-workflow-action.
@styfle Thanks, I understand that we cannot know if the cancelling was successful or not. Nonetheless, do we have a way to check if a previous build was running before cancelling it (vs if there was none) ? This is the information I would need 😄
from cancel-workflow-action.
Yes that is possible. Basically we could return the status codes from the api as outputs so you get an empty array when nothing was cancelled or an array of 202 if all the ids were cancelled (or perhaps 500 if GH API was down).
We already log this information so it can be turned into Action outputs too.
from cancel-workflow-action.
@styfle Sounds good for me !
from cancel-workflow-action.
Hey! Has anyone had a chance to work on this? If not, I may be able to do so soon 😄
from cancel-workflow-action.
Closing since there are no upvotes on this issue and no one is working on it
from cancel-workflow-action.
Related Issues (20)
- `Error: Not Found` when running action HOT 3
- Prints a lot details and makes action messier. HOT 4
- GitHub Action marketplace page not updated with latest version info HOT 1
- Cancel action makes our repo test badge "failing" HOT 4
- Fork-based setup seems to cancel itself and not the target workflows HOT 7
- Finding 0 runs HOT 5
- Actions now has built-in cancelation HOT 2
- Does this work on prs? HOT 1
- cancel workflow without email? HOT 2
- possible to cancel previous workflows only when a specific job has not been started? HOT 1
- how to make a cancelled workflow count as skip instead of failed? HOT 3
- Use Node.js v16 HOT 2
- Cancelling the current run HOT 2
- Archive this repo HOT 3
- error message using this step HOT 5
- It should cancel all instances of running workflow when workflow name in workflow_id is specified HOT 3
- Cancel Actions Got A Error HOT 1
- Flag to pick `in_progress`, `waiting` or both to be canceled HOT 2
- Deprecation warning for use of Node 16
- Azure Pipelines alternative HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cancel-workflow-action.