Closed binarymonkey84 closed 2 months ago
Thank you for raising this issue, @binarymonkey84! I've managed to get Theme Check running on PRs with the following configuration:
name: CI Build and Test
on:
pull_request:
types: [ opened ]
branches: [ main ]
jobs:
theme-check:
name: Theme Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Theme Check
uses: shopify/theme-check-action@v2
Please let me know if we've missed anything tho! Thanks again for bringing reporting this :)
I tried setting up the action with
on: pull_request
instead ofon: [push]
, but this doesn't appear to work.I was expecting that to work since the action is described as being for checking code on pull requests.
I can't really have this running on every
push
event for every branch, since we are using Shopify Github Integration. This integration pushes commits when a merchant changes anything in Theme Customiser. That means multiple daily pushes, and we don't need Theme Check running on those.Is this a known issue or am I doing something wrong here?
As a workaround I've used the below configuration to avoid the action running on my
main
branch, but there are other branches we want to exclude as well, and I'd rather not have to explicitly define every branch individually for every repo we're working on. It would be far simpler to just work on thepull_request
event, as that would require no repo-specific configuration.