github / codeql-action

Actions for running CodeQL analysis
MIT License
1.14k stars 315 forks source link

Running codeql-analysis on all the branches of a repository #462

Closed adithyaakrishna closed 3 years ago

adithyaakrishna commented 3 years ago

Is it possible to run codeql-analysis on all the branches of a repo possible or not?

The action should basically run on all the branches a PR is targeted to from the Main repository. I tried searching across github but couldn’t find anything.

Screenshot: image

aeisenberg commented 3 years ago

Yes, you can run your analysis across all branches. There is an error in your yaml.

** is a special character sequence in yaml. It needs to be quoted. But even simpler would be to remove the branches directive entirely. If it is missing, then the workflow will be triggered on all branches.

adithyaakrishna commented 3 years ago

Thanks a lot @aeisenberg . If I remove the branches directive entirely, then it would look like this right? image

Which will enable the workflow to trigger across all branches? Please do let me know if any changes are necessary with respect to the code above

aeisenberg commented 3 years ago

This looks right to me. Have you tried it?

adithyaakrishna commented 3 years ago

Yes @aeisenberg It perfectly works 🎉

JacquesLeRoux commented 2 years ago

Hi,

I tried both syntaxes today but none worked.

Please see content of https://github.com/apache/ofbiz-framework/commit/91357bbf0eabd147b87385fd94cb0b139058fa12

TIA for any help

JacquesLeRoux commented 2 years ago

Ha wait got it, no java nor js files changed, please forget it