Skip to content

Commit 923f309

Browse files
authored
allow manual deployment of linting
1 parent 6ec81de commit 923f309

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

.github/workflows/lint-and-tests.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ on:
1616
types:
1717
- labeled
1818
merge_group:
19+
workflow_dispatch:
1920

2021
defaults:
2122
run:
@@ -49,13 +50,13 @@ jobs:
4950
run: echo "turbo_args=--force=true" >> "$GITHUB_OUTPUT"
5051

5152
lint:
52-
# This Job should run either on `merge_groups` or `push` events
53+
# This Job should run either on `merge_groups`, `push`, or `workflow_dispatch` events
5354
# or `pull_request_target` event with a `labeled` action with a label named `github_actions:pull-request`
5455
# since we want to run lint checks against any changes on pull requests, or the final patch on merge groups
5556
# or if direct pushes happen to main (or when changes in general land on the `main` (default) branch)
5657
# Note that the reason why we run this on pushes against `main` is that on rare cases, maintainers might do direct pushes against `main`
5758
if: |
58-
(github.event_name == 'push' || github.event_name == 'merge_group') ||
59+
(github.event_name == 'push' || github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') ||
5960
(github.event_name == 'pull_request_target' &&
6061
github.event.label.name == 'github_actions:pull-request')
6162
@@ -111,7 +112,7 @@ jobs:
111112
# the Pull Request comes from a Crowdin Branch, as we don't want to run ESLint and Prettier on Crowdin PRs
112113
# Note: Linting and Prettifying of files on Crowdin PRs is handled by the `translations-pr.yml` Workflow
113114
if: |
114-
(github.event_name == 'push' || github.event_name == 'merge_group') ||
115+
(github.event_name == 'push' || github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') ||
115116
(github.event_name == 'pull_request_target' &&
116117
github.event.pull_request.head.ref != 'chore/crowdin')
117118
# We want to enforce that the actual `turbo@latest` package is used instead of a possible hijack from the user
@@ -140,12 +141,12 @@ jobs:
140141
key: cache-lint-${{ hashFiles('package-lock.json') }}-${{ hashFiles('.turbo/cache/**') }}
141142

142143
tests:
143-
# This Job should run either on `merge_groups` or `push` events
144+
# This Job should run either on `merge_groups`, `push`, or `workflow_dispatch` events
144145
# or `pull_request_target` event with a `labeled` action with a label named `github_actions:pull-request`
145146
# since we want to run lint checks against any changes on pull requests and on final patches against a pull request.
146147
# We don't need to execute the tests again on pushes against (`main`) as the merge group should already handle that
147148
if: |
148-
(github.event_name == 'push' || github.event_name == 'merge_group') ||
149+
(github.event_name == 'push' || github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') ||
149150
(github.event_name == 'pull_request_target' &&
150151
github.event.label.name == 'github_actions:pull-request')
151152
@@ -197,7 +198,7 @@ jobs:
197198
# We only need to run Storybook Builds and Storybook Visual Regression Tests within Pull Requests that actually
198199
# introduce changes to the Storybook. Hence, we skip running these on Crowdin PRs and Dependabot PRs
199200
if: |
200-
github.event_name == 'push' ||
201+
github.event_name == 'push' || github.event_name == 'workflow_dispatch' ||
201202
(github.event_name == 'pull_request_target' &&
202203
startsWith(github.event.pull_request.head.ref, 'dependabot/') == false &&
203204
github.event.pull_request.head.ref != 'chore/crowdin')

0 commit comments

Comments
 (0)