Skip to content

Commit

Permalink
Update lint workflow to only trigger linting once on PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
marcwrobel committed Nov 26, 2023
1 parent 5c03e02 commit 9dfd8f4
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
name: Lint

on: [push, pull_request, workflow_dispatch]

env:
FORCE_COLOR: 1
on:
push:
branches: ['main']

This comment has been minimized.

Copy link
@hugovk

hugovk Nov 26, 2023

Member

I'm not a fan of this branch restriction, it means contributors cannot run the CI on their fork when using feature branches.

The restriction encourages them to work on their main branch, which is not a best practice.

This comment has been minimized.

Copy link
@marcwrobel

marcwrobel Nov 27, 2023

Author Member

I understand, but on the other hand, the linter is not executed twice on PRs. And ultimately it is executed once the PR is created, even if the PR was not created on main.

This comment has been minimized.

Copy link
@hugovk

hugovk Nov 27, 2023

Member

Okay, please see #197 to avoid double testing internal PRs.

pull_request:
workflow_dispatch: # Allows running the workflow manually from the Actions tab

permissions:
contents: read

env:
FORCE_COLOR: 1

jobs:
lint:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 9dfd8f4

Please sign in to comment.