siderolabs / conform

Policy enforcement for your pipelines.
Mozilla Public License 2.0
432 stars 45 forks source link

Run on multiple commits during a pull_request #174

Open priyasiddharth opened 4 years ago

priyasiddharth commented 4 years ago

Hello,

I had conform as a github action but on a pull request/push with multiple commits - it only appears to run on the latest commit.

How can I make it run on every commit in the diff with the base branch?

This is my config action - https://github.com/seahorn/seahorn/blob/master/.github/workflows/conform.yml config - https://github.com/seahorn/seahorn/blob/master/.conform.yaml

thanks Siddharth

andrewrynhard commented 4 years ago

hello, that is currently not possible, but i would be happy to accept a PR

priyasiddharth commented 4 years ago

I will not have cycles to fix this as of now. I will atleast try to send an update to the README to mention this limitation.

janderssonse commented 1 year ago

@priyasiddharth It seems multicommit support was added in this commit, however it is not really documented. https://github.com/siderolabs/conform/commit/9023e3a114677975577153025e69dcdeebf72034

JossWhittle commented 1 year ago

@priyasiddharth It seems multicommit support was added in this commit, however it is not really documented. 9023e3a

Any idea how to enable this in a Github Actions workflow? There's a ton of potential in this tool but the documentation is lacking to make that feasible.

janderssonse commented 1 year ago

@JossWhittle I got it working in a GH workflow by doing this->. https://github.com/janderssonse/janderscripts/blob/main/.github/workflows/dco.yml. It runs on pr's only, and checks all commits on that pr against main branch, but skips if not on a pr. Also look at the .conform.yaml in the project for settings i used. Note: (The GH checkout action needs a special ref setting, otherwise it will only check the merge commit, there are a few issues about that on the GH action issue tracker for example https://github.com/actions/checkout/issues/881 ).