checks-action
checks-action copied to clipboard
Not working when multiple workflows are triggered by a commit
When you have have multiple workflows that can be triggered by the same commit, the checks-action only adds the checks to the first executed workflow.
here is the debug output of the first exectued workflow, that was able to add the run-check in it's summary:
Run LouisBrunner/[email protected]
with:
token: ***
repo: modix/base
sha: f396e2c2c4e53761830f906bcaf4bef2e56c08a0
name: Build Image
status: completed
conclusion: success
output: {
"summary": "Build status: success",
"text_description": "Image pushed to [***.dkr.ecr.eu-central-1.amazonaws.com/modix/base/php:8-cli](https://eu-central-1.console.aws.amazon.com/ecr/repositories/private/***/modix/base/php)"
}
##[debug]Parsing inputs
##[debug]Setting up OctoKit
##[debug]Creating a new Run on modix/base@f396e2c2c4e53761830f906bcaf4bef2e56c08a0
::set-output name=check_id::3597153344
##[debug]='3597153344'
##[debug]Done
the summary then looks like this:
and here is the debug output another workflow run that is triggered by the same commit but runs after the first workflow (same result for all but the first)
Run LouisBrunner/[email protected]
with:
token: ***
repo: modix/base
sha: f396e2c2c4e53761830f906bcaf4bef2e56c08a0
name: Build Image
status: completed
conclusion: success
output: {
"summary": "Build status: success",
"text_description": "Image pushed to [***.dkr.ecr.eu-central-1.amazonaws.com/modix/base/node:16](https://eu-central-1.console.aws.amazon.com/ecr/repositories/private/***/modix/base/node)"
}
##[debug]Parsing inputs
##[debug]Setting up
OctoKit
##[debug]Creating a new Run on modix/base@f396e2c2c4e53761830f906bcaf4bef2e56c08a0
::set-output name=check_id::3597139023
##[debug]='3597139023'
##[debug]Done
in this workflow the run-checks are not displayed/not added to the run, though the debug output says everything was working fine....
I'm also experiencing this
Hi @zolex, thanks for your report!
What happens if you call the Checks differently? (it looks like both are called "Build Image"?)
Might be related to https://github.community/t/specify-check-suite-when-creating-a-checkrun/118380/18
The check-run seems to be posted under the wrong suite when pointing at a different commit or outside job
Yeah, looks like it.
Is there an update on this?
@lukasmalkmus I am not sure if there is any way to fix this as it looks like an issue from GitHub (we can't specify the suite when creating a Check, instead we rely only on the SHA and hope that GitHub does the correlation correctly, which it doesn't always).
We have been able to solve this problem, using the token of a GitHub App (instead of GITHUB_TOKEN). In this way, the check run is associated with a specific new check suite associated with the GitHub App.
We use this other action to generate a temporally GitHub App token for use in the workflow https://github.com/peter-murray/workflow-application-token-action
This configuration must also be taken into account in the repo settings.