Skip to content

Commit 1e46962

Browse files
committed
Only run "Arduino IDE" workflow on relevant changes
The "Arduino IDE" workflow performs the following operations when triggered on push and pull request events: - Build application - Lint code - Run tests - Produce tester packages All of these operations are specific to the TypeScript/JavaScript code base and its infrastructure. Previously, the workflow ran whenever any file in the repository was changed. This includes files that have no relevance, meaning the operations performed by the workflow were pointless. In addition to general inefficiency, these lengthy and sometimes spuriously failing unnecessary workflow runs might cause delay or confusion to both the contributors and maintainers for what would otherwise be a simple process. GitHub Actions provides the ability to configure path filters for the workflow triggers. The workflow will only run on events that change files satisfying these path filters. This is "AND"ed with the `branches` filters, meaning the existing restrictions on which branches produce a run remain unchanged. The `tags` filter is independent from the `paths` and `branches` filters, meaning the added path filters don't make any change to which tag push events will trigger the workflow.
1 parent 34ef25c commit 1e46962

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/build.yml

+16
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,26 @@ on:
44
push:
55
branches:
66
- main
7+
paths-ignore:
8+
- '.github/**'
9+
- '!.github/workflows/build.yml'
10+
- '.vscode/**'
11+
- 'docs/**'
12+
- 'scripts/**'
13+
- 'static/**'
14+
- '*.md'
715
tags:
816
- '[0-9]+.[0-9]+.[0-9]+*'
917
workflow_dispatch:
1018
pull_request:
19+
paths-ignore:
20+
- '.github/**'
21+
- '!.github/workflows/build.yml'
22+
- '.vscode/**'
23+
- 'docs/**'
24+
- 'scripts/**'
25+
- 'static/**'
26+
- '*.md'
1127
schedule:
1228
- cron: '0 3 * * *' # run every day at 3AM (https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule)
1329

0 commit comments

Comments
 (0)