Skip to content

Commit 73f8668

Browse files
ci: workflows improvements (#7)
* ci: workflows improvements * ci: added `tag-conflicts` action * ci(test): only test on `lua` and `tests` directories
1 parent 00f93e0 commit 73f8668

File tree

4 files changed

+26
-11
lines changed

4 files changed

+26
-11
lines changed

.github/workflows/docs.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ on:
66
- main
77
paths:
88
- "README.md"
9-
pull_request:
10-
branches:
11-
- main
12-
paths:
13-
- "README.md"
149

1510
jobs:
1611
docs:

.github/workflows/lint.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
name: lint
22

33
on:
4-
push:
5-
branches:
6-
- main
7-
paths:
8-
- "lua/**"
9-
- "tests/**"
104
pull_request:
115
branches:
126
- main
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Tag PRs with merge conflicts
2+
3+
on:
4+
# So that PRs touching the same files as the push are updated
5+
push:
6+
# So that the `dirtyLabel` is removed if conflicts are resolve
7+
# We recommend `pull_request_target` so that github secrets are available.
8+
# In `pull_request` we wouldn't be able to change labels of fork PRs
9+
pull_request_target:
10+
types: [synchronize]
11+
12+
jobs:
13+
main:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: check if prs are dirty
17+
uses: eps1lon/actions-label-merge-conflict@releases/2.x
18+
with:
19+
dirtyLabel: conflicts
20+
removeOnDirtyLabel: conflicts
21+
repoToken: "${{ secrets.GITHUB_TOKEN }}"
22+
commentOnDirty: "⚠️ This PR has conflicts. Please, solve them."
23+
commentOnClean: "✅ The conflict have been solved! Ready to review."

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
pull_request:
55
branches:
66
- main
7+
paths:
8+
- "lua/**"
9+
- "tests/**"
710

811
jobs:
912
run_tests:

0 commit comments

Comments
 (0)