Repository navigation
TST: Skip CI in Action - #11168
TST: Skip CI in Action#11168
Conversation
This comment has been minimized.
This comment has been minimized.
|
I suppose the |
|
I was about to add https://github.com/pllim/actions-cancel-workflows here too (tested at kali-maa#42) but now I am not sure with your comment about Docker being slow. Should I just use the third-party Action (https://github.com/styfle/cancel-workflow-action)? For that third-party one, I couldn't vet the code because its |
This comment has been minimized.
This comment has been minimized.
|
Well, it's just that needing a docker build which takes ~1min just to check some string in a commit message seems a bit overkill, but I don't have a better solution for now ... |
|
I was talking about this file, which I think Speed wise, there are two possible solutions but none of them pretty:
|
90e5b11 to
63e966e
Compare
This comment has been minimized.
This comment has been minimized.
|
FWIW, it seems to work at https://github.com/pllim/playpen/runs/1566774010?check_suite_focus=true Also, I have it pull the Docker image now instead of creating from scratch, so the "build" part went down from over a minute to 18s. Maybe it is more bearable this way? Let's defer the cancel duplicate runs to another PR. One thing at a time. |
66aa60f to
740a1e3
Compare
|
No, something is still not right. It tried to cancel but it didn't work. Maybe it is grabbing the token from my fork, which does not have the power to cancel jobs here upstream? If that is the case, we cannot know if the cancelling will work until this is merged. 🤷 |
|
Cancelling does not work at kali-maa#43 . I need to understand this inconsistency. I think I have convinced myself that when a PR is opened from a fork, the canceling does not work. So, I think I have to go back to failing this outright. |
The javascript file is generated from the typescript one ;)
Yes, seems much better 👍 |
740a1e3 to
022e4d9
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
022e4d9 to
ddec852
Compare
|
I rewrote it in TypeScript. Now it takes 3s to run. UPDATE: I was testing the Action that Simon talked about and it worked well and though might as well add it here. UPDATE 2: I pinned the third-party action to its release hash, just in case. |
5979e54 to
f8b0dbb
Compare
TST: Add a step to also cancel prev runs and pin it to release hash.
|
Thanks to brilliant idea from @eslavich over at spacetelescope/jwst#5591 , I updated the Action to not fail, so now you get your nice green check mark and also cancelled jobs. |
|
Yay for keeping at it! It sounds very nice now, and also extensible. Will you make the javascript part of the PR? In any case, do change the message actually shown ("Failure means CI is skipped on purpose"). |
This comment has been minimized.
This comment has been minimized.
|
I meant whatever is in "pllim/action-skip-ci@main" and the other one! |
|
I fixed the bug upstream in the action.
Ah, I thought I linked them above. But here they are again. This time, I'll link to the actual TypeScript where the implementation is.
|
|
So this PR seems ready right ? It looks great and I think we should start to use it and see how it goes. |
|
Yeah, I have been using it myself. If we move the code to some org, I'll batch PR to update all affected packages. |
Description
This pull request is to implement a workaround to enable skipping CI in Actions portion of #11038 .
This uses custom Action at action-skip-ci and styfle/cancel-workflow-action.
If this works correctly, only one Action job would run and it will
failset output value, preventing other jobs from running. What is not showcased here is that duplicate runs would also be cancelled if the CI is not skipped (I tested this on my own repo).If this needs backporting, please re-milestone.