Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Act is hardcoded to a specific image #132

Copy link
Copy link
@andre15silva

Description

@andre15silva
Issue body actions

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.

@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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.