You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: do not skip merge gorup
- add `merge_group` as workflow trigger
- add `merge_group` to default value sfor `do-not-skip` triggers : else, worfklow will be skipped when the PR is added to a merge queue since it just ran before
* chore: compile
---------
Co-authored-by: Felix K <[email protected]>
@@ -235,6 +235,7 @@ To minimize changes to existing jobs, it is often easier to skip entire jobs.
235
235
>
236
236
> - You may need to use [`fromJSON`](https://docs.github.com/en/actions/learn-github-actions/expressions#fromjson) to access properties of object outputs. For example, for `skipped_by.id`, you can use the expression: `${{ fromJSON(steps.skip_check.outputs.skipped_by).id }}`.
237
237
> - For GitHub repositories where [default permissions](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository) for `GITHUB_TOKEN` has been set to "permissive (read-only)", the following lines must be included in the workflow (see [permissions syntax](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions)):
238
+
>
238
239
> ```yaml
239
240
> # Minimum permissions required by skip-duplicate-actions
240
241
> permissions:
@@ -408,14 +409,15 @@ stateDiagram-v2
408
409
409
410
### How to Use Skip Check With Required Matrix Jobs?
410
411
411
-
Discussed in https://github.com/fkirc/skip-duplicate-actions/issues/44.
412
+
Discussed in <https://github.com/fkirc/skip-duplicate-actions/issues/44>.
412
413
413
414
If you have matrix jobs that are registered as required status checks and the matrix runs conditionally based on the skip check, you might run into the problem that the pull request remains in a unmergable state forever because the jobs are not executed at all and thus not reported as skipped (`Expected - Waiting for status to be reported`).
414
415
415
416
There are several approaches to circumvent this problem:
416
417
417
-
- Define the condition (`if`) in each step in the matrix job instead of a single condition on the job level: https://github.com/fkirc/skip-duplicate-actions/issues/44
418
+
- Define the condition (`if`) in each step in the matrix job instead of a single condition on the job level: <https://github.com/fkirc/skip-duplicate-actions/issues/44>
418
419
- If you want the check to be considered successful only if all jobs in the matrix were successful, you can add a subsequent job whose only task is to report the final status of the matrix. Then you can register this final job as a required status check:
420
+
419
421
```yaml
420
422
result:
421
423
name: Result
@@ -429,6 +431,7 @@ There are several approaches to circumvent this problem:
429
431
if: needs.example-matrix-job.result != 'success'
430
432
run: exit 1
431
433
```
434
+
432
435
- Define an opposite workflow, as offically suggested by GitHub: [Handling skipped but required checks](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks)
0 commit comments