[workflows] Prevent duplicate runs of lint workflows after merging a PR (#1059)

This commit is contained in:
Manav Rathi 2024-03-12 14:21:46 +05:30 committed by GitHub
commit e358738c35
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 8 additions and 25 deletions

View file

@ -1,11 +1,9 @@
name: "Lint (auth)"
on:
# Run on every push to branches (this also covers pull requests)
# Run on every push to a branch other than main that changes auth/
push:
# See: [Note: Specify branch when specifying a path filter]
branches: ["**"]
# Only run if something changes in these paths
branches-ignore: [main]
paths:
- "auth/**"
- ".github/workflows/auth-lint.yml"

View file

@ -1,11 +1,9 @@
name: "Lint (mobile)"
on:
# Run on every push (this also covers pull requests)
# Run on every push to a branch other than main that changes mobile/
push:
# See: [Note: Specify branch when specifying a path filter]
branches: ["**"]
# Only run if something changes in these paths
branches-ignore: [main]
paths:
- "mobile/**"
- ".github/workflows/mobile-lint.yml"

View file

@ -1,11 +1,9 @@
name: "Lint (server)"
on:
# Run on every push (this also covers pull requests)
# Run on every push to a branch other than main that changes server/
push:
# See: [Note: Specify branch when specifying a path filter]
branches: ["**"]
# Only run if something changes in these paths
branches-ignore: [main]
paths:
- "server/**"
- ".github/workflows/server-lint.yml"

View file

@ -1,20 +1,9 @@
name: "Lint (web)"
on:
# Run on every push (this also covers pull requests)
# Run on every push to a branch other than main that changes web/
push:
# [Note: Specify branch when specifying a path filter]
#
# Path filters are ignored for tag pushes, which causes this workflow to
# always run when we push a tag. Defining an explicit branch solves the
# issue. From GitHub's docs:
#
# > if you define both branches/branches-ignore and paths/paths-ignore,
# > the workflow will only run when both filters are satisfied.
#
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
branches: ["**"]
# Only run if something changes in these paths
branches-ignore: [main]
paths:
- "web/**"
- ".github/workflows/web-lint.yml"