-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
The setup of our Act abstraction is hard-coded to a specific runner image.
If we are using another image (which perhaps does not need building), this will not work.
gitbugactions/gitbugactions/actions/actions.py
Lines 224 to 252 in 2302622
| @staticmethod | |
| def __setup_act(): | |
| with Act.__SETUP_LOCK: | |
| if Act.__ACT_SETUP: | |
| return | |
| # Checks act installation | |
| run = subprocess.run( | |
| f"{Act.__ACT_PATH} --help", shell=True, capture_output=True | |
| ) | |
| if run.returncode != 0: | |
| logging.error("Act is not correctly installed") | |
| exit(-1) | |
| # Creates crawler image | |
| client = docker.from_env() | |
| if len(client.images.list(name="gitbugactions")) > 0: | |
| client.images.remove(image="gitbugactions") | |
| with open("Dockerfile", "w") as f: | |
| client = docker.from_env() | |
| dockerfile = "FROM catthehacker/ubuntu:full-latest\n" | |
| dockerfile += f"RUN sudo groupadd -o -g {os.getgid()} {grp.getgrgid(os.getgid()).gr_name}\n" | |
| dockerfile += f"RUN sudo usermod -G {os.getgid()} runner\n" | |
| dockerfile += f"RUN sudo usermod -u {os.getuid()} runner\n" | |
| f.write(dockerfile) | |
| client.images.build(path="./", tag="gitbugactions", forcerm=True) | |
| os.remove("Dockerfile") | |
| Act.__ACT_SETUP = True |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels