HSF / prmon

Standalone monitor for process resource consumption

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Push within the Clang-Format workflow doesn't trigger the CI workflow

amete opened this issue · comments

It seems that by design an action performed in a workflow doesn't trigger a new workflow in GitHub actions. As a result, in a situation where Clang-Format pushes changes to a branch in an existing pull request, the CI doesn't run for that specific commit/push, i.e. see #137.

However, apparently there is a workaround to this behavior by:

  • Creating a personal access token (PAT) as described here,
  • Creating and storing the aforementioned PAT in an encrypted secret in the repository as described here,
  • In the Clang-Workflow overwrite the GITHUB_TOKEN w/ this PAT from the secrets, e.g. setting GITHUB_TOKEN = ${{ secrets. PATNAME }}.

Having said all these, from a practical point of view:

  • The CI runs and publishes results in the pull request for the actual commit/push (i.e. before formatting),
  • clang-format only changes the formatting of the C/C++ files which is a benign operation (still things can theoretically go wrong, e.g. corruption etc.),
  • When we commit/push changes to master/stable (i.e. by accepting a pull request), the final code is always tested by running the CI anyways (i.e. the automatically formatted code eventually gets tested).

Mainly due to the last point above, I don't think this is an important shortcoming and things can be left as they are. In any case, let me know what you think @graeme-a-stewart.

Yes, I think we can live with the current workflow, because releases are also separate from the head of master and would be made from a known, tested, version of the code.

What I would still encourage people to do is to clang-format their commits, so that the CI check is just a null op.

I completely agree, closing this now 👍