redhat-actions / push-to-registry

GitHub Action to push a container image to an image registry.
https://github.com/marketplace/actions/push-to-registry
MIT License
97 stars 32 forks source link

[BUG] buildah is not found while using on `nektos/act` #62

Closed georgettica closed 1 year ago

georgettica commented 2 years ago

Version

N/A

Describe the bug

I pulled the example from https://github.com/redhat-actions/push-to-registry#examples and tried to run in locally.

the tool I was using is https://github.com/nektos/act.

the local build failed

I would love to make this work locally as-well so I can build this GHA with confidence.

I am not sure the maintainer of act can help here, but we might want to add him in if need be

Steps to reproduce, workflow links, screenshots

the failure I started with is:

act
...
[Build and Push Image/Build and push image]   ❗  ::error::Error: Unable to locate executable file: buildah. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.

and after adding the section:

   - name: Install Buildah
       run: |
         if ! $(which buildah 2>&1 >/dev/null); then
           apt-get update
           apt-get -y install buildah
         fi

it fails on:

act
...
| E: Unable to locate package buildah
divyansh42 commented 2 years ago

@georgettica I think buildah is not provided by the act, and that's the main reason for failure. For that, it would be great if you can open up an issue in the act repository.

Although when you are installing buildah using a custom run step, it should work. Could you please check if it is installed properly or not by doing buildah version in the Install buildah step.

georgettica commented 1 year ago

seems this was answered by the act team, closing