Add concurrency to kill prev CI task
Description
This fixes #102 This PR aims to add feature, which kills previous CI job, if new change is committed.
Checklist
- [x] I have followed the Contribution Guidelines and Code of Conduct
- [x] I have commented my code following the OpenMined Styleguide
- [ ] I have labeled this PR with the relevant Type labels
- [x] My changes are covered by tests
@rasswanth-s I am not able to join OpenMined Slack Channel 😮💨
I am not sure, Did you try the opemined.org website, I think it has the invite link.
I am not sure, Did you try the opemined.org website, I think it has the invite link.
It's not working
I am not sure, Did you try the opemined.org website, I think it has the invite link.
It's not working
I saw an issue in opened in PySyft regarding the same. https://github.com/OpenMined/PySyft/issues/5891. Could you follow the issue. I am also not sure why it is not working.
@shubhank-saxena , is the github.head_ref issue fixed? , where only it allows single workflow to be run ,as it would be good to have it PR independent.
@shubhank-saxena , is the
github.head_refissue fixed? , where only it allows single workflow to be run ,as it would be good to have it PR independent.
Sorry I was little confused with previous comments. With respect to PR, I think github.base_ref works ?
I think github.base_ref won't work ,as it points to the target branch of the pull request.Could you take a look at this documentation: https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions , I think github.ref would work. Could you also test these changed locally in your repo, like the merging the current changes to your forked repo,create two dummy pull requests to check if workflow runs independently .
https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions
Yes, github.ref is working. It's killing prev CI tasks in the same PR, but not interfering with other PRs.

I viewed your forked branch, Could you test by merging your concurrency PR to your main branch and then creating two dummy PR's to check if they are running concurrently.I think testing without merging would revert us back to default scenario.
I viewed your forked branch, Could you test by merging your concurrency PR to your main branch and then creating two dummy PR's to check if they are running concurrently.I think testing without merging would revert us back to default scenario.
Done!
@rasswanth-s does this need more review?
Yes @gmuraru , we should make the workflow cancellation PR independent, that part is remaining.
@shubhank-saxena ,I viewed your dummy pull requests in your repo, The workflow are being cancelled for separate PR's, I also tested it in my repo, I think we should try other context variables ,the github.ref is not working.
@shubhank-saxena ,I viewed your dummy pull requests in your repo, The workflow are being cancelled for separate PR's, I also tested it in my repo, I think we should try other context variables ,the
github.refis not working.
Sorry I wasn't able to replicate the error. To me, it seemed as if it was working as expected. Let me try other context
No issues @shubhank-saxena :+1: ,I think github.job might work, not completely sure.
@shubhank-saxena any update on this?
@shubhank-saxena any update on this?
Sorry I was caught up with something. Let me try this scope on my fork and update here asap!