Code Monkey home page Code Monkey logo

act-environments's Introduction

Overview

This repo contains Packer scripts to create docker images necessary to run GitHub actions locally with nektos/act. The source for these scripts originally came from actions/virtual-environments.

Building Images

Run:

packer build -var github_feed_token=XXXXXXXXX images/linux/ubuntu1804.json

act-environments's People

Contributors

cplee avatar testpersonal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

act-environments's Issues

Support environment files

I'm not sure what needs changing, but the 18.04 images from earlier this year don't support environment files, so actions relying on them get error messages like this one:

/actions/actions-setup-elixir@v1/dist/install-otp: line 12: $GITHUB_PATH: ambiguous redirect

docker: Got permission denied

Hello,
I'm facing an issue, I'm not sure if I'm using the right token or not. Would you please clarify how to generate the Github feeds token. I'm using the Github personal access token but I'm getting the issue below:

$ packer build -var github_feed_token=XXXX images/linux/ubuntu1804.json
docker: output will be in this color.

==> docker: Creating a temporary directory for sharing data...
==> docker: Pulling Docker image: buildpack-deps:18.04
    docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.40/images/create?fromImage=buildpack-deps&tag=18.04: dial unix /var/run/docker.sock: connect: permission denied
==> docker: Error pulling Docker image: Bad exit status: 1
Build 'docker' errored after 71 milliseconds 304 microseconds: Error pulling Docker image: Bad exit status: 1

==> Wait completed after 71 milliseconds 340 microseconds

==> Some builds didn't complete successfully and had errors:
--> docker: Error pulling Docker image: Bad exit status: 1

==> Builds finished but no artifacts were created.

Thanks in advanced

Packer script halts due to systemd prompt

Hey! ๐Ÿ‘‹ Thanks for working on this tool, it's awesome!

Partway through packer build -var github_feed_token=XXX images/linux/ubuntu1804.json, I get this prompt from Docker about systemd that expects a TTY:

    docker: Setting up systemd (237-3ubuntu10.39) ...
    docker:
    docker: Configuration file '/etc/systemd/system.conf'
    docker:  ==> File on system created by you or by a script.
    docker:  ==> File also in package provided by package maintainer.
    docker:    What would you like to do about it ?  Your options are:
    docker:     Y or I  : install the package maintainer's version
    docker:     N or O  : keep your currently-installed version
    docker:       D     : show the differences between the versions
    docker:       Z     : start a shell to examine the situation
    docker:  The default action is to keep your current version.

Is there a workaround for this?

Reduce sizes of images

The Ubuntu image is 6.5GB (!) compressed. I couldn't even pull this image on my laptop today, since I "only" allocate 45GB to Docker Desktop:

$ docker pull nektos/act-environments-ubuntu:18.04
18.04: Pulling from nektos/act-environments-ubuntu
5c939e3a4d10: Pull complete
c63719cdbe7a: Pull complete
19a861ea6baf: Pull complete
651c9d2d6c4f: Pull complete
8dd387d4677b: Pull complete
2277daa6bda3: Pull complete
44122f010d2c: Pull complete
27df41a4b327: Pull complete
e5e1946d6282: Extracting [==================================================>]  6.592GB/6.592GB
failed to register layer: Error processing tar file(exit status 1): write /usr/lib/x86_64-linux-gnu/libnetsnmpagent.so.30.0.3: no space left on device

Surely it doesn't need to be that huge.

Enhancement: AWS CLI

Describe feature

Hey there. First thanks for all the great work you do.

I stumbled upong something while using act. I am using the docker image nektos/act-environments-ubuntu:18.04 which really helps testing my workflows.
But the AWS CLI included in this env is aws-cli/1.18.2 Python/2.7.17 Linux/5.8.0-50-generic botocore/1.15.2 while the one used by github has one major more: AWS CLI version aws-cli/2.1.38 Python/3.8.8 Linux/5.4.0-1046-azure exe/x86_64.ubuntu.20 prompt/off.

This prevent testing AWS execution like

aws lambda invoke \
                --cli-binary-format raw-in-base64-out \
                --function-name ${function} \
                --payload "${lambda_payload}" \
                response.json

In ACT the --cli-binary-format raw-in-base64-out is rejected, while if you don't put this argument, your Github Actions fails because in AWS CLI 2+ it is necessary (defaults to base64).

Thought it would be nice to raise an enhancement request here about it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.