Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working when multiple workflows are triggered by a commit #26

Closed
zolex opened this issue Sep 14, 2021 · 7 comments
Closed

Not working when multiple workflows are triggered by a commit #26

zolex opened this issue Sep 14, 2021 · 7 comments
Labels
bug Something isn't working dependencies Pull requests that update a dependency file wontfix This will not be worked on

Comments

@zolex
Copy link

zolex commented Sep 14, 2021

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/checks-action@v1.2.0
  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:

image

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/checks-action@v1.2.0
  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....

image

@Jamesking56
Copy link

I'm also experiencing this

@LouisBrunner
Copy link
Owner

Hi @zolex, thanks for your report!

What happens if you call the Checks differently? (it looks like both are called "Build Image"?)

@prince-chrismc
Copy link

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

@LouisBrunner
Copy link
Owner

Yeah, looks like it.

@lukasmalkmus
Copy link

Is there an update on this?

@LouisBrunner LouisBrunner added bug Something isn't working wontfix This will not be worked on labels Aug 31, 2022
@LouisBrunner
Copy link
Owner

@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).

@LouisBrunner LouisBrunner added the dependencies Pull requests that update a dependency file label Aug 31, 2022
@LouisBrunner LouisBrunner pinned this issue Aug 31, 2022
@alambike
Copy link

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.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

6 participants