Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
yanksyoon committed Jul 4, 2023
1 parent b360dfe commit f53db4c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
if not LXD_PROFILE_YAML.exists():
LXD_PROFILE_YAML = LXD_PROFILE_YAML.parent / "lxd-profile.yml"


@dataclass
class WgetExecutable:
"""The executable to be installed through wget.
Expand All @@ -48,9 +49,11 @@ class WgetExecutable:
url: The URL of the executable binary.
cmd: Executable command name. E.g. yq_linux_amd64 -> yq
"""

url: str
cmd: str


class Runner:
"""Single instance of GitHub self-hosted runner.
Expand Down Expand Up @@ -385,7 +388,14 @@ def _install_binary(self, binary: Path) -> None:
# machines are created from custom images/GitHub runner image.

self._apt_install(["docker.io", "npm", "python3-pip", "shellcheck", "jq", "wget"])
self._wget_install([WgetExecutable(url="https://github.com/mikefarah/yq/releases/download/v4.34.1/yq_linux_amd64", cmd="yq")])
self._wget_install(
[
WgetExecutable(
url="https://github.com/mikefarah/yq/releases/download/v4.34.1/yq_linux_amd64",
cmd="yq",
)
]
)

# Add the user to docker group.
self.instance.execute(["/usr/sbin/usermod", "-aG", "docker", "ubuntu"])
Expand Down

0 comments on commit f53db4c

Please sign in to comment.