Closed romani closed 1 month ago
@relentless-pursuit ,
I think we should cancel previous executions if one more is triggered. Please investigate how to archive this. We already have this model in some workflows in main repo.
Purpose of concurrency in GitHub Actions:
Current setup:
github.run_id
).Basic options:
a. Allow all runs (current setup):
concurrency:
group: ${{ github.run_id }}
cancel-in-progress: false
b. One run per PR at a time:
concurrency:
group: ${{ github.workflow }}-${{ github.event.issue.number }}
cancel-in-progress: false
c. Always run latest, cancel others:
concurrency:
group: ${{ github.workflow }}-${{ github.event.issue.number }}
cancel-in-progress: true
@romani if we wish to go with your suggestion, i believe option c can help.
The choice depends on your specific needs for the Diff-Report action. Consider factors like resource usage, how often reports are needed, and the importance of always having the very latest changes in the report.
As you can see with changes in workflow to option c, i can only run the latest. Others will be cancelled in the same PR.
We need One run per PR at a time:
Please do it in your org and test it
Ok, I see it. Please keep diff , share here a branch , we will merge it after initial merge.
We can close this issue.
for now we use: https://github.com/checkstyle/checkstyle/blob/6fff4fa9b16a3bb03a92de004663096815227b29/.github/workflows/diff-report.yml#L30-L33
but may be we should cancel previous executions and concurrency should be by PR number. But it use to be line this: https://github.com/checkstyle/checkstyle/commit/22c0361c6efafbce9972ebbe005a36090d1724e6 https://github.com/checkstyle/checkstyle/pull/14069