Skip to content

add-apt-repository command stops when trying to test in local machine using nektos/act #19

Closed
@kohei-noda-qcrg

Description

@kohei-noda-qcrg

I sometimes use nektos/act to test a program in a local environment and then push it, in order to reduce unnecessary testing of GitHub actions in a private repository.

I used this action to simplify the setup of gfortran, but when doing add-apt-repository I get the following message and have to press the keyboard to proceed.

More info: https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
Adding repository.
Press [ENTER] to continue or Ctrl-c to cancel.

Keyboard input during action execution is disabled in nektos/act, so to set up gfortran with this action,
I need to redirect as gh act > out etc.

To solve this problem we need to add the --yes option to the add-apt-repository command.
https://stackoverflow.com/questions/45548826/apt-get-how-to-bypass-pressing-enter#:~:text=This%20message%20stems%20from%20a%20call %20to%20add%2Dapt%2Drepository.

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