Dockerfiles icon indicating copy to clipboard operation
Dockerfiles copied to clipboard

Update workflows to only add a single comment for how to run an image

Open TimHess opened this issue 2 months ago • 2 comments

See #48 for an example of excessive "how to run this image" comments

TimHess avatar Sep 25 '25 20:09 TimHess

One way to accomplish this is by using the GitHub CLI, such as here:

run: gh pr comment $PR_NUMBER --edit-last --create-if-none --body-file coveragereport/Summary.md
env:
  GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  PR_NUMBER: ${{ github.event.number }}

bart-vmware avatar Sep 30 '25 11:09 bart-vmware

One way to accomplish this is by using the GitHub CLI, such as here:

run: gh pr comment $PR_NUMBER --edit-last --create-if-none --body-file coveragereport/Summary.md
env:
  GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  PR_NUMBER: ${{ github.event.number }}

That seems like a simple solution, but there are up to 4 different workflows that might want to add a comment... quick experiment in #50 shows the comments overwrite each other. We could probably do some scripting to evaluate the comment body and append to it, but I wonder how annoying that race condition would be.

TimHess avatar Oct 01 '25 16:10 TimHess