# File Filter Github Actions Style

**URL:** <https://forum.buildkite.community/t/file-filter-github-actions-style/4189>\
**Category:** Features Requests\
**Created:** [January 30, 2025, 12:09am UTC](https://forum.buildkite.community/t/file-filter-github-actions-style/4189 "2025-01-30T00:09:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sshleifer](https://avatars.discourse-cdn.com/v4/letter/s/c67d28/32.png) [@sshleifer](https://forum.buildkite.community/u/sshleifer)\
**Post date:** [January 30, 2025, 12:09am UTC](https://forum.buildkite.community/t/file-filter-github-actions-style/4189/1 "2025-01-30T00:09:08Z")

</div>

I have a pipeline that runs unittests in buildkite.  
At my old job I did it with github actions and we had a file filter like this

```auto
on:
  workflow_dispatch:
  # Trigger the workflow on push to main
  schedule:
    - cron: '30 10 * * *'
  push:
    branches:
      - main
    paths:
      - 'megatron/**'
     - '!megatron/megatron/configs/**.yaml'
  pull_request:
    paths:
      - 'megatron/**'
      - '!megatron/megatron/configs/**.yaml'

```

Is there a way to implement this in buildkite?  
If not is there a workaround where a github action could trigger buildkite?

---

<div class="post-metadata">

**Author:** ![lizette](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/lizette/32/1161_2.png) [@lizette](https://forum.buildkite.community/u/lizette)\
**Post date:** [January 31, 2025, 3:02am UTC](https://forum.buildkite.community/t/file-filter-github-actions-style/4189/2 "2025-01-31T03:02:55Z")

</div>

Hi @sshleifer ,

For this Github action, you can create a Buildkite pipeline with a scheduled builds specified by its cron intervals. You can read more about that in our docs here - [Scheduled builds | Buildkite Documentation](https://buildkite.com/docs/pipelines/configure/workflows/scheduled-builds#schedule-intervals).

For filtering the events to trigger the builds, once the Github webhooks are setup, you can specify the branch configuration and settings in your pipelines where you can specify conditional and branch filtering patterns to configure your pipelines. [GitHub | Buildkite Documentation](https://buildkite.com/docs/pipelines/source-control/github#branch-configuration-and-settings)

Additionally, you can specify the pipeline settings on running builds on pull requests as mentioned in our docs here [GitHub | Buildkite Documentation](https://buildkite.com/docs/pipelines/source-control/github#running-builds-on-pull-requests)

As for triggering builds based on file paths, we can do that with the use of one of our plugins - [GitHub - buildkite-plugins/monorepo-diff-buildkite-plugin: Run separate pipelines for each folder in your monorepo](https://github.com/buildkite-plugins/monorepo-diff-buildkite-plugin) - where you can use the `path` and `skip_path` attributes accordingly.

Hope this helps!

Cheers,
