skip-duplicate-actions
skip-duplicate-actions copied to clipboard
Skip concurrent not working
hi guys
I had a quick question.
We just started using this action to make sure we don't get double action runs when pushing and then creating a pull request. The config we have is the following:
steps:
- name: Check Duplicate Actions
id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
concurrent_skipping: 'same_content'
....
Our triggers for the actions are as follows:
on: [push, workflow_dispatch, pull_request]
Now, with this configuration, we still get a double run when pushing and the creating a pull request. In both logs, I see the following:
Run fkirc/skip-duplicate-actions@master
with:
concurrent_skipping: same_content
github_token: ***
paths_ignore: []
paths: []
cancel_others: true
skip_after_successful_duplicate: true
do_not_skip: ["workflow_dispatch", "schedule"]
Did not find other workflow-runs to be cancelled
Skip execution because the exact same files are concurrently checked in https://github.com/.../actions/runs/658092745
It's a bit confusing since it says it did not find any other workflows to cancel but it also says 'skip execution' which it then doesn't do.
Am I missing a part of the configuration? Are we doing something wrong?
Any help is appreciated! Cheers
You are seeing this cancellation-message because you have cancel_others: true
, which is the default-setting.
Please note that cancellation and skipping are two completely different features.
To reduce this confusion, I am thinking about changing the default to cancel_others: false
.
After all, my belief is that cancellation does not fit for every project, and it also generates those annoying cancellation-mails from GitHub.
So should I change my config in any way to make sure it only triggers one action when we have a push and pull_request running for the same branch?
I believe that you need to add one more trigger to your do_not_skip
-list (either push
or pull_request
).
Otherwise, it might happen that both push
and pull_request
are skipped concurrently.
hm, at the moment, both of them keep running. But I'll add one to the do_not_skip list and see if it helps! Thanks for the quick replies!
If both of them are still running, then it seems that the should_skip
-output is ignored.
There are multiple ways to evaluate the should_skip
-output, two ways are mentioned in Readme.
I'm also getting issue with the duplicate skipping, I'm pretty much using example 1 and the step tells me Skip execution because another instance of the same workflow is already running in
but the following step which has the if: ${{ needs.deduplication.outputs.should_skip != 'true' }}
line isn't stopping it trigger.
Not really sure what to try to change to fix this.
So, we saw a similar behavior to the OP's case, where two builds were both being skipped and cited each other as the cause, over on Hubris. It turned out to be the concurrent_skipping: 'same_content'
setting. It seems like this setting is basically always a bad idea -- using same_content_newer
fixes the issue.
So, we saw a similar behavior to the OP's case, where two builds were both being skipped and cited each other as the cause, over on Hubris. It turned out to be the
concurrent_skipping: 'same_content'
setting. It seems like this setting is basically always a bad idea -- usingsame_content_newer
fixes the issue.
same_content is primarily meant to be used in combination with do_not_skip, but I agree that same_content_newer might be a better standalone-option.
Closing this due to inactivity...
(See also #250)