Commit b5b28b5
authored
fix(lint-pr-title): adapt action and Dockerfile to bun workspaces (#1120)
* fix(lint-pr-title): adapt action and Dockerfile to bun workspaces
The lint-pr-title action was failing to run correctly after the migration
to bun workspaces in 9ffb9ce. This was
due to two issues:
1. The composite action was not checking out the shared-workflows
repository, so the workspace dependencies could not be installed.
2. The Dockerfile was not adapted to the workspace structure, and the
tests were failing due to file permission issues.
This commit addresses both issues. The action.yml now checks out the
shared-workflows repository, following the pattern of other actions in
this repository. The Dockerfile is updated to correctly build in a
workspace context and to run the tests as a non-root user to ensure
file permission tests pass.
It sort of kept working because we forgot to remove the bun.lock file in
`actions/lint-pr-title.` This papered over the problem until a Bun
update needed to update the lock file and it stopped working. Here we
remove that.
Now that we use files outside of the action's own directory
(`package.json`, `bun.lock`), we need to check the repository out and
run from the root.
* refactor(lint-pr-title): modernise Dockerfile (#1121)
The previous Dockerfile was overly complex and inefficient, a result of
adapting an older style to a workspace environment. The multi-stage
build was difficult to read and did not use modern Docker features for
caching.
To fix these problems, we simplify the build process into a more
readable multi-stage build. We introduce Docker cache mounts for
dependency installation, which will result in significantly faster
builds. The COPY commands are now more specific to avoid copying
unnecessary files into the image. Tests continue to be run as a non-root
user to ensure file permission tests work correctly, but in a more
streamlined way.1 parent bece5bb commit b5b28b5
3 files changed
+58
-594
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
1 | 4 | | |
| 5 | + | |
2 | 6 | | |
3 | 7 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
8 | 26 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
| 27 | + | |
| 28 | + | |
13 | 29 | | |
14 | | - | |
15 | | - | |
16 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
17 | 33 | | |
18 | | - | |
19 | 34 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | 35 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
28 | 51 | | |
29 | | - | |
| 52 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
18 | 29 | | |
19 | 30 | | |
20 | 31 | | |
21 | | - | |
| 32 | + | |
22 | 33 | | |
23 | 34 | | |
24 | 35 | | |
25 | | - | |
| 36 | + | |
26 | 37 | | |
27 | | - | |
| 38 | + | |
28 | 39 | | |
29 | 40 | | |
30 | 41 | | |
31 | | - | |
| 42 | + | |
32 | 43 | | |
33 | 44 | | |
34 | 45 | | |
| |||
0 commit comments