Skip to content

Commit d1c92f6

Browse files
authored
only run workflow on commit to main branch
Signed-off-by: GitHub <noreply@github.com>
1 parent e5d557a commit d1c92f6

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/lint.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22

33
name: Lint
44

5-
# Trigger the workflow on both push (to the main repository)
6-
# and pull requests (against the main repository, but from any repo).
7-
on: [push, pull_request]
5+
# Trigger the workflow on both push (to the main repository, on the main branch)
6+
# and pull requests (against the main repository, but from any repo, from any branch).
7+
on:
8+
push:
9+
branches:
10+
- main
11+
pull_request:
812
# Brand new concurrency setting! This ensures that not more than one run can be triggered for the same commit.
913
# It is useful for pull requests coming from the main repository since both triggers will match.
1014
concurrency: lint-${{ github.sha }}

0 commit comments

Comments
 (0)