Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Action usable inside a Docker container #121

Closed
wants to merge 17 commits into from

Conversation

akashchi
Copy link

@akashchi akashchi commented Nov 7, 2023

Hi,

We are using this action to install Python on ARM machines and the workflow steps are executed inside a container (almost bare ubuntu:20.04).

There is a known problem with github.action_path - it is incorrectly set if the action is executed inside a container: 1, 2. We have encountered it ourselves when trying to use the action. It failed with:
image

The proposed fix is to check if the install_python script exists under either of the two paths:

  • ${{ github.action_path }}/bin/ - for the outside container scenario
  • $GITHUB_ACTION_PATH/bin/ - for the inside container scenario

I've added the matrix entry with a Docker image to check if this would work: it works.

@asottile
Copy link
Member

asottile commented Nov 7, 2023

this is not intended to be used inside a container -- you're free to maintain your fork which does though!

@asottile asottile closed this Nov 7, 2023
@ilya-lavrenov
Copy link

strange position since using docker images in GHA is quite popular

@asottile
Copy link
Member

asottile commented Nov 7, 2023

I'm not going to hack around a bug in github for something I don't intend to support and has a bunch of complexity and problem surface area

@cmarqu
Copy link

cmarqu commented Jul 30, 2024

For anyone doing a web search for the error message, it is
/__w/_temp/97ed7fc6-352d-4a8c-a3a5-50c825ab89c0.sh: line 1: /runner/_work/_actions/deadsnakes/action/v3.1.0/bin/install-python: No such file or directory

@deadsnakes deadsnakes locked as off-topic and limited conversation to collaborators Jul 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants