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

[BUG] cocogitto-action fails in a container workflow #38

Open
joshua-clayton opened this issue Feb 18, 2025 · 2 comments
Open

[BUG] cocogitto-action fails in a container workflow #38

joshua-clayton opened this issue Feb 18, 2025 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@joshua-clayton
Copy link

Describe the bug

Run cocogitto/cocogitto-action@v3
Run echo Installing cocogitto
Installing cocogitto
Run /home/runner/work/_actions/cocogitto/cocogitto-action/v3.9/install.sh
/__w/_temp/729ed381-bc31-4442-9f88-561d312080c8.sh: line 1: /home/runner/work/_actions/cocogitto/cocogitto-action/v3.9/install.sh: No such file or directory
Error: Process completed with exit code 127.

To Reproduce
add a "using: cocogitto-action@v3" step to a job that runs in a container: here is what I added:

Expected behavior
I expect cocogitto to run install.sh from the correct directory

Additional context
Due to what is probably a historical quirk, container workflows define $GITHUB_WORKSPACE and some other variables differently. My guess is that $GITHUB_ACTION_PATH is also defined relative to /__w/ instead of /home/runner/work.

workaround: run cocogitto-action in a non-containerized job, then pass the version to the build as an output.

@joshua-clayton joshua-clayton added the bug Something isn't working label Feb 18, 2025
@oknozor
Copy link
Collaborator

oknozor commented Feb 19, 2025

What container are you using ?
Can you provide the action workflow or a minimal reproducer ?

@joshua-clayton
Copy link
Author

Hi. Those are very reasonable things to ask for. I cloned the repository, and added a container workflow test...

https://github.com/joshua-clayton/cocogitto-action/blob/container-fix/.github/workflows/ci.yaml

and while I was at it I tested out my theory and it turns out I was right. So now I've got a pull request.

#39

If you pull just the test (and not the fix) you should see it fail, and with the fix commit it passes again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants