Commit 6ffb86d
committed
Convert to composite run steps action
When the action was created, the only option for non-JavaScript actions was to use a Docker container. However, GitHub
recently added a new action type: the "composite run steps action":
https://docs.github.com/en/free-pro-team@latest/actions/creating-actions/creating-a-composite-run-steps-action
The Docker container approach has the significant advantage of providing a controlled environment for the action to run
in, which will not pollute the general environment of the runner for later workflow steps. However it also has a couple
disadvantages:
- Docker container actions can only execute on runners with a Linux operating system.
- The workspace is mounted to a folder in the container named `/github/workspace`.
The problem with the first is it prevents testing for other operating systems. Arduino boards platforms have different
toolchains and even build properties according to operating system of the machine they are running on. Only testing on
a Linux system may result in missing issues that affect the majority of users.
Although more still needs to be done to make the action cross-platform, converting to a composite run steps action is
the first step toward that goal.
The problem with the second is that, in order to be valid, an Arduino sketch folder must match the filename of the
primary sketch file. For a sketch in the root of the repository, a sketch author might achieve this to some limited
extent by naming the repository to match the primary sketch file name. However, the container volume is not named
according to the repository name, so sketches in the root of the repository are not currently supported by the action
(except in the unlikely event the sketch happens to be named "workspace"). Even though structuring sketch repositories
in this manner is not best practices due to GitHub's popular "Download ZIP" appending the Git ref to the end of the
folder name, the purpose of this action is to compile sketches, not legislate repository policy, so it is reasonable to
support this use case.
The workspace folder in the GitHub Actions runner is named according to the repository name, meaning that converting to
a composite run steps action permits use with sketches in the root of the repository.1 parent 106113e commit 6ffb86d
3 files changed
+71
-12
lines changedThis file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
0 commit comments